關(guān)于在CentOS下MRTG的正確安裝方法
關(guān)于在CentOS下MRTG的正確安裝方法
安裝方法如下:
- yum install net-snmp net-snmp-utils mrtg
恩,安裝好了。
接著生成配置文件:
==========================================
- vim /etc/snmp/snmpd.conf
把第89行前面的注釋符號(hào)#去掉,變成
- view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc
在62行進(jìn)行修改:將
- access notConfigGroup “” any noauth exact systemview none none
改為
- access notConfigGroup “” any noauth exact mib2 none none
===============================================
- /usr/bin/cfgmaker public@localhost > /etc/mrtg/mrtg.cfg
接著配置:
- vim /etc/mrtg/mrtg.cfg
輸入以下:
- HtmlDir: /opt/mrtg
- ImageDir: /opt/mrtg
- LogDir: /var/lib/mrtg
- ThreshDir: /var/lib/mrtg
- Target[rl]: 2:public@localhost
- MaxBytes[rl]: 1250000
- Title[rl]: 流量監(jiān)測(cè)系統(tǒng)
- Xsize[rl]: 600
- Options[rl]: gauge, nopercent, growright
再配置crontab:
crontab -e
輸入:
- */5 * * * * env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
代表每5分鐘收集一次數(shù)據(jù)顯示。
done
以上配置方法在cent os 5.5 64位rhel5.5的64位分別成功。
【編輯推薦】