配置 FreeBSD 7 MRTG 流量分析

一:安装snmp
%cd /usr/ports/net-mgmt/net-snmp
%make install

修改/etc/rc.conf:
加入:snmpd_enable=”YES”

运行下:%/etc/netstart
编辑snmpd.conf:
%vi Systems /usr/local/share/snmp/snmpd.conf

加入一行:
rocommunity mrtg #默认让snmp使用mrtg用户

启动snmpd:<br cheap jerseys />
%/usr/local/etc/rc.d/snmpd start

二:安装mrtg:

确定ports下的mrtg在什么位置:
freebsd7# cd /usr/ports/
freebsd7# make search name=mrtg
freebsd7# whereis mrtg<br Wholesale Jerseys />
mrtg: /usr/local/bin/mrtg /usr/local/man/man1/mrtg.1.gz /usr/ports/net-mgmt/mrtg
安装mrtg:<br cheap mlb jerseys />
%cd /usr/ports/net-mgmt/mrtg
%make install
进入你apache的data目录(我的是cd /usr/local/www/apache22/data/)
在当前的WEB目录创建mrtg的目录:
%mkdir mrtg
三:配置mrtg:

进入mrtg的配置文件所在目录:
%cd ???? /usr/local/etc/mrtg
用cfgmaker创建mrtg的配置文件:<br the /><br wholesale nfl jerseys />
%/usr/local/bin/cfgmaker http://www.chicagobearsjerseyspop.com mrtg@www.abc.cn > mrtg.cfg
记得将上面的www.abc.cn换成你的主机名,或IP地址.我的是内部测试我用192.168.1.248
编辑mrtg.conf:<br cheap jordan />
%vi mrtg.cfg
#####################################
WorkDir: cheap jerseys cheap oakleys /usr/local/www/apache22/data/mrtg Get #注:去掉前面的#号哟,冒号后面不要有空格,否则会出错.
Language: chinese #注:这表示简体中文版,自己加上去注意当使用gb2312的时候有$1$2/秒这样的乱码

生成index.html文件:<br hockey jerseys />
/usr/local/bin/indexmaker -title=”mrtg.cn” -output=/usr/local/www/apache22/data/mrtg/index.html mrtg.cfg
多运行几次:
#/usr/local/bin/mrtg mrtg.cfg
直到没有出错提示为止

加入crontab每隔2分钟让数据刷新一次:Watch Full Movie Online fake ray bans Streaming Online and Download

*/2 * * cheap oakleys * * for root /usr/local/bin/mrtg Nfl /usr/local/etc/mrtg/mrtg.cfg
http://192.168.1.1/mrtg/index.html

配置调试完成!Roblox HackBigo Live Beans HackYUGIOH DUEL LINKS HACKPokemon Duel HackRoblox HackPixel Gun 3d Hack<a rel="dofollow" href="http://androidhackcheat.com/hack/growtopia.aspx" c… title=”Growtopia Hack” style=”font-size:1px”>Growtopia HackClash Royale Hackmy cafe recipes stories hackMobile Legends HackMobile Strike Hack

时间:2010/06/21
/
浏览:1801 Views views
/
分类:光影涂鸦
/

你目前的身份是游客,评论请输入昵称和电邮!
输入评论内容...

Please type the characters of this captcha image in the input box

请键入图片中的字符