- 安裝MRTG
debian:~# apt-get install snmp snmpd mrtg
debian:~# cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bak
debian:~# rm /etc/snmp/snmpd.conf
debian:~# touch /etc/snmp/snmpd.conf
debian:~# vi /etc/snmp/snmpd.conf
add
rocommunity public
save&exit
debian:~# /etc/init.d/snmpd restart - 測試snmp是否正常啟動
debian:~# snmpwalk -c public -v 1 localhost - 設定/etc/mrtg.cfg
add&fix
WorkDir: /var/www/mrtg
EnableIPv6: no
WorkDir: /var/www/mrtg
Target[eth0]: \eth0:public@localhost:
Refresh: 600
Interval: 5
MaxBytes[eth0]: 1310720
Language: ansi
options[_]: bits, growright, transparent, printrouter, pngdate
PNGTitle[eth0]: tweetylny-tw.org
XScale[eth0]: 1.8
YScale[eth0]: 1.8
LegendO[eth0]: eth0 out flow
LegendI[eth0]: eth0 in flow
Colours[eth0]: 1#FFCC00,2#336699,3#FF0000,4#00FF00;
SetEnv[eth0]: MRTG_INT_IP="123.204.90.138" MRTG_INT_DESCR="eth0" EMAIL="root@tweetylny.org" HOST="tweetylny.org"
Title[eth0]: tweetylny.org
PageTop[eth0]: <h1>tweetylny.org</h1>
save&exit - 執行mrtg,建立index.html
debian:~# mrtg /etc/mrtg.cfg 執行三次
debian:~# indexmaker -output=/var/www/mrtg/index.html -title='tweetylny.org Traffic Info' /etc/mrtg.cfg - Debain預設的值
主要網站是掛在/var/www/mrtg
cron檔放在/etc/cron.d/mrtg 5分鍾更新一次
2008年10月6日 星期一
Debian MRTG安裝
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言