-r--r--r-- 1 root root
741517 May 27 21:08 apache-1.3.6-7.i386.rpm
-r--r--r-- 1 root root 63934 May 27 21:10 gd-1.3-5.i386.rpm -r--r--r-- 1 root root 4438337 May 27 21:14 perl-5.00503-2.i386.rpm |
-rw-r--r-- 1 root ftp 479215 Oct 24 09:30 mrtg-2.8.8-cfix.tar.gz |
[root@test /]# rpm
-qa | grep apache-
apache-1.3.6-7 |
[root@test /]# rpm
-qa | grep gd-
gd-1.3-5 |
[root@test /]# rpm
-qa | grep perl
perl-5.00503-2 |
[root@test /]# cd
/mnt
[root@test /mnt]# mount cdrom |
[root@test /mnt]# cd
/mnt/cdrom/RedHat/RPMS/
[root@test RPMS]# |
[root@test RPMS]# rpm -ivh apache-1.3.6-7.i386.rpm |
[root@test RPMS]# rpm -ivh gd-1.3-5.i386.rpm |
[root@test RPMS]# rpm -ivh perl-5.00503-2.i386.rpm |
[root@test RPMS]# cd
/root
[root@test /root]# ftp vdn1.hmes.kh.edu.tw Connected to vdn1.hmes.kh.edu.tw. 220 vdn1.hmes.kh.edu.tw FTP server (Version wu-2.4.2-VR17(1) Mon Apr 19 09:21:5. Name (vdn1.hmes.kh.edu.tw:jang): anonymous 331 Guest login ok, send your complete e-mail address as password. Password:<--輸入您的email做為密碼 230 Guest login ok, access restrictions apply. Remote system type is UNIX. Using binary mode to transfer files. ftp> cd pub 250 CWD command successful. ftp> cd mrtg 250 CWD command successful. ftp> bin 200 Type set to I. ftp> get mrtg-2.8.8-cfix.tar.gz local: mrtg-2.8.8-cfix.tar.gz remote: mrtg-2.8.8-cfix.tar.gz 200 PORT command successful. 150 Opening BINARY mode data connection for mrtg-2.8.8-cfix.tar.gz (479215 byte. 226 Transfer complete. 479215 bytes received in 0.0497 secs (9.4e+03 Kbytes/sec) ftp> exit 221-You have transferred 479215 bytes in 1 files. 221-Total traffic for this session was 479820 bytes in 1 transfers. 221-Thank you for using the FTP service on vdn1.hmes.kh.edu.tw. 221 Goodbye. [root@test /root]# |
[root@test /root]#
tar zxvf mrtg-2.8.8-cfix.tar.gz
[root@test /root]# ls -al drwxr-xr-x 7 root root 1024 Oct 20 17:08 mrtg-2.8.8 |
[root@test /root]# mv mrtg-2.8.8 /home |
[root@test /root]# cd
/home/mrtg-2.8.8
[root@test mrtg-2.8.8]# ./configure loading cache ./config.cache checking for gcc... (cached) gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... (cached) yes checking whether gcc accepts -g... (cached) yes checking how to run the C preprocessor... (cached) gcc -E checking whether make sets ${MAKE}... (cached) yes checking for perl... (cached) /usr/bin/perl checking for acos in -lm... (cached) yes checking for gdImageGif in -lgd... (cached) yes checking for gdImagePng in -lgd... (cached) no checking the weather... (cached) its fine checking if we can use GCC-specific compiler options... (cached) yes creating ./config.status creating Makefile ordering CD from http://cdnow.com/gift/oetiker@ee.ethz.ch .... just kidding ;-) ----------------------------------------------------------------
Type 'make' to compile the software ... that wishlist mentioned above
does realy exist. So if
-- Tobi Oetiker <oetiker@ee.ethz.ch>
|
[root@test mrtg-2.8.8]# make
/usr/bin/perl -0777 -pi -e 's@^#!\s*/\S*perl@#! /usr/bin/perl@' run/cfgmaker rug /usr/bin/perl -0777 -pi -e 's@(day|week|month|year|peri.)\.(png|gif)@$1.gif@g' r [root@test mrtg-2.8.8]# |
[root@test mrtg-2.8.8]# mkdir
/home/httpd/html/mrtg
[root@test mrtg-2.8.8]# cp images/mrtg*.gif /home/httpd/html/mrtg |
[root@test mrtg-2.8.8]# cd
run
[root@test run]# ./cfgmaker public@163.18.225.254>mrtg.cfg |
[root@test run]# qe mrtg.cfg |
在Target[163.18.225.254.2001]: -2001:public@163.18.225.254(IP位置會依實際情況而不同)
中2001代表Zylan 4024的S2/1 port,也就是接ATU-R的port,可用來當成對外的流量! -2001應改為2001,其餘port均保留負號不變。 |
找出各 port 之使用 server 及 相對編號
[XzLan 4024]:
修改各個port的抬頭說明:
|
[root@test run]# cd
/home/mrtg/run
[root@test run]# ./mrtg mrtg.cfg |
[root@test run]# cd
/home/httpd/html/mrtg/
[root@test mrtg]# ls -al |
[root@test mrtg]# cd
/home/mrtg-2.8.8
[root@test mrtg-2.8.8]# qe cron.mrtg |
[root@test mrtg-2.8.8]# crontab cron.mrtg |
[root@vdn1 mrtg-2.8.8]#
crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall. # (cron.mrtg installed on Tue Oct 26 15:19:16 1999) # (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $) 0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/mrtg-2.8.8/run/mrtg /home/mrtg-2.8.8/run/mrtg.cfg |
每一 port 之統計圖在 163.18.242.254.xxxx.html 中
(xxxx 為 port 代碼)
位址如下 : http://<web server IP or domain name
>/<traffic data directory>/<traffic data html>
<web server IP> : 福康流量統計網站 : mrtg.fkps.kh.edu.tw
<traffic data directory> : 目錄 nettraffic \
<traffic data html> : 單一 port 之流量統計網頁 163.18.242.254.2001.html
如:
2001 port : http://mrtg.fkps.kh.edu.tw/nettraffic/163.18.242.254.2001.html