配置 FreeBSD 7 MRTG 流量分析

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

\n

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

\n

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

\n

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

\n

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

\n

二:安装mrtg:

\n

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

\n

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

\n

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

\n

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

\n

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

\n

配置调试完成!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

\n

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

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