分类: LINUX
2008-11-13 11:31:00
tar xvf mrtg-2.16.2.tar.gz cd mrtg-2.16.2 ls ./configure --help | less ./configure --prefix=/usr/local/mrtg --with-gd=/usr/include/ --with-gd-lib=/usr/lib --with-gd-inc=/usr/include/ --wit h-png=/usr/include/ --with-zlib=/usr/include/ make && make install mkdir /usr/local/http-2.06/htdocs/mrtg |
将
#view systemview included mib2
修改为:
view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc
access notConfigGroup "" any noauth exact systemview none none
修改为:
access notConfigGroup "" any noauth exact mib2 none none
保存,重起snmpd
这一步我认为很重要,我之前的一次没有这样做,所以最后出来的结果就不正确。
cd /usr/local/mrtg/bin/ ./cfgmaker public@localhost > /usr/local/http-2.06/htdocs/mrtg/mrtg.cfg |
去掉如下行的注释
# Options[_]: growright, bits
添加如下行,实现网页中的中文字符显示
Language:gb2312
并且首列不能是空格。否则一会儿会出错。
生成MRTG网页主页面文件
./indexmaker /usr/local/http-2.06/htdocs/mrtg/mrtg.cfg --output=/usr/local/http-2.06/htdocs/mrtg/index.html -title="max flow" |