MRTG 安裝
OS FreeBSD 5.3-RELEASE-p2
先裝 snmpd-5.1_1#cd /usr/ports/net-mgmt/net-snmp
#make install clean
裝完,再裝 mrtg-2.11.0,1#cd /usr/ports/net-mgmt/mrtg
#make install clean
建立MRTG設定檔# cd /usr/local/etc/mrtg
# cfgmaker mrtg@your.ip > mrtg.cfg (pank 版 cfgmaker public@your.ip --output=mrtg.cfg )兩者意義一樣
修改 /usr/local/www/etc/mrtg/mrtg.cfg
Workdir: /usr/local/www/data/mrtg
Language: big5
Options[_]: growright然後使用指令 indexmaker 來建立 MRTG 的首頁:
# indexmaker mrtg.cfg > /usr/local/www/data/mrtg/index.htm
接下來要將MRTG的一些圖片檔複製到 mrtg 的目錄裡:# cd /usr/ports/distfiles
# tar zxvf mrtg-2.11.0,1.tar.gz
# cd mrtg-2.11.0,1
# cp -rf images/* /usr/local/www/data/mrtg/
第一次執行mrtg
# /usr/local/bin/mrtg /usr/local/etc/mrtg/mrtg.cfg
用crontab定期執行 (每n分鐘執行一次)# ee /var/cron/tabs/root
*/n * * * * /usr/local/bin/mrtg /usr/local/etc/mrtg/mrtg.cfg
搞定~
先裝 snmpd-5.1_1#cd /usr/ports/net-mgmt/net-snmp
#make install clean
裝完,再裝 mrtg-2.11.0,1#cd /usr/ports/net-mgmt/mrtg
#make install clean
建立MRTG設定檔# cd /usr/local/etc/mrtg
# cfgmaker mrtg@your.ip > mrtg.cfg (pank 版 cfgmaker public@your.ip --output=mrtg.cfg )兩者意義一樣
修改 /usr/local/www/etc/mrtg/mrtg.cfg
Workdir: /usr/local/www/data/mrtg
Language: big5
Options[_]: growright然後使用指令 indexmaker 來建立 MRTG 的首頁:
# indexmaker mrtg.cfg > /usr/local/www/data/mrtg/index.htm
接下來要將MRTG的一些圖片檔複製到 mrtg 的目錄裡:# cd /usr/ports/distfiles
# tar zxvf mrtg-2.11.0,1.tar.gz
# cd mrtg-2.11.0,1
# cp -rf images/* /usr/local/www/data/mrtg/
第一次執行mrtg
# /usr/local/bin/mrtg /usr/local/etc/mrtg/mrtg.cfg
用crontab定期執行 (每n分鐘執行一次)# ee /var/cron/tabs/root
*/n * * * * /usr/local/bin/mrtg /usr/local/etc/mrtg/mrtg.cfg
搞定~
留言
張貼留言