监测终端网络环境–Smokeping 安装

1、安装依赖包:
yum install -y perl perl-Net-Telnet perl-Net-DNS perl-LDAP perl-libwww-perl perl-IO-Socket-SSL perl-Socket6 perl-Time-HiRes perl-ExtUtils-MakeMaker rrdtool rrdtool-perl curl httpd httpd-devel gcc make wget libxml2-devel libpng-devel glib pango pango-devel freetype freetype-devel fontconfig cairo cairo-devel libart_lgpl libart_lgpl-devel popt popt-devel libidn libidn-devel
2、安装fping
wget http://www.fping.org/dist/fping-3.13.tar.gz
tar xf fping-3.13.tar.gz
cd fping-3.13
./configure
make && make install

3、安装echoping
wget http://fossies.org/linux/misc/old/echoping-6.0.2.tar.gz
tar xf echoping-6.0.2.tar.gz
cd echoping-6.0.2
./configure
make && make install

4、安装smokeping
wget http://oss.oetiker.ch/smokeping/pub/smokeping-2.6.9.tar.gz
tar xf smokeping-2.6.9.tar.gz
cd smokeping-2.6.9
./setup/build-perl-modules.sh /usr/local/smokeping/thirdparty
./configure –prefix=/usr/local/smokeping
/usr/bin/gmake install

5、配置 smokeping
cd /usr/local/smokeping/
mkdir cache data var
touch /var/log/smokeping.log
chown apache:apache cache data var
chown apache:apache /var/log/smokeping.log
chmod 600 /usr/local/smokeping/etc/smokeping_secrets.dist
cd /usr/local/smokeping/htdocs
mv smokeping.fcgi.dist smokeping.fcgi
cd /usr/local/smokeping/etc
mv config.dist config

6、更改配置文件
vim /usr/local/smokeping/etc/config
修改如下内容:
cgiurl = http://本机IP/smokeping.cgi

找到
*** Probes ***

+ FPing

编辑binary = /usr/local/sbin/fping

7、编辑apache配置文件
vim /etc/httpd/conf/httpd.conf
最后边添加如下:
Alias /cache “/usr/local/smokeping/cache/”
Alias /cropper “/usr/local/smokeping/htdocs/cropper/”
Alias /smokeping “/usr/local/smokeping/htdocs/smokeping.fcgi”
<Directory “/usr/local/smokeping”>
AllowOverride None
Options All
AddHandler cgi-script .fcgi .cgi
Order allow,deny
Allow from all
DirectoryIndex smokeping.fcgi
</Directory>
8、图像浏览界面的中文支持
安装字体
yum -y install wqy-zenhei-fonts.noarch
编辑smokeping的配置文件
vim /usr/local/smokeping/etc/config
在 *** Presentation ***的下边添加
charset = utf-8
编辑Graphs.pm
vim /usr/local/smokeping/lib/Smokeping/Graphs.pm
#在’–end’, $tasks[0][2], 下边一行
‘–font TITLE:20:”WenQuanYi Zen Hei Mono”‘,
9、配置监控列表
config 配置文件的最后边
vim /usr/local/smokeping/etc/config
+ Other
menu = 三大网络监控
title = 监控统计
++ dianxin-bj
menu = 监控1
title = 监控1
alerts = someloss
host = 目标主机IP
10、启动apache和smokeping
/etc/init.d/httpd start
/usr/local/smokeping/bin/smokeping

暂无评论

发表评论

电子邮件地址不会被公开。 必填项已用*标注