centos6安裝smokeping
第一步 安裝依賴包
yum -y install rrdtool popt* curl bind-utils openssh-clients httpd 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 libidn* make automake wqy-zenhei-fonts.noarch
service httpd restart
chkconfig httpd on
第二步 安裝三小包
cd /root
tar zxvf fping-3.10.tar.gz
cd fping-3.10
./configure --prefix=/usr/local/fping && make && make install
ln -s /usr/local/fping/sbin/fping /usr/sbin/fping
cd /root/
cd /root
tar zxvf echoping-6.0.2.tar.gz
cd /root/echoping-6.0.2
./configure --prefix=/usr/local/echoping && make && make install
cd /root/
tar zxvf smokeping-2.6.9.tar.gz
cd /root/smokeping-2.6.9/
./setup/build-perl-modules.sh /usr/local/smokeping/thirdparty
./configure --prefix=/usr/local/smokeping
/usr/bin/gmake install
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
第三步 配置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>
第四步 瀏覽器設置
安裝字體
yum -y install wqy-zenhei-fonts.noarch
編輯smokeping的配置文件
vim /usr/local/smokeping/etc/config
第50行添加
charset = utf-8 #添加此行
編輯Graphs.pm
vim /usr/local/smokeping/lib/Smokeping/Graphs.pm
#第147行下邊插入下邊一行
‘--font TITLE:20:"WenQuanYi Zen Hei Mono"‘,
第五步 加入的檢測地址
config 配置文件的最後邊
vim /usr/local/smokeping/etc/config
+ Other
menu = 三大網絡監控
title = 監控統計
++ dianxin
menu = 電信網絡監控
title = 電信網絡監控列表
host = /Other/dianxin/dianxin-bj /Other/dianxin/dianxin-hlj /Other/dianxin/dianxin-tj /Other/dianxin/dianxin-sc /Other/dianxin/dianxin-sh /Other/dianxin/dianxin-gz
+++ dianxin-bj
menu = 北京電信
title = 北京電信
alerts = someloss
host = 202.96.199.133
+++ dianxin-hlj
menu = 黑龍江電信
title = 黑龍江電信
alerts = someloss
host = 219.147.198.242
+++ dianxin-tj
menu = 天津電信
title = 天津電信
alerts = someloss
host = 219.150.32.132
+++ dianxin-sc
menu = 四川電信
title = 四川電信
alerts = someloss
host = 61.139.2.69
+++ dianxin-sh
menu = 上海電信
title = 上海電信
alerts = someloss
host = 116.228.111.118
+++ dianxin-gz
menu = 廣東電信
title = 廣東電信
alerts = someloss
host = 113.111.211.22
++ liantong
menu = 聯通網絡監控
title = 聯通網絡監控列表
host = /Other/liantong/liantong-bj /Other/liantong/liantong-hlj /Other/liantong/liantong-tj /Other/liantong/liantong-sc /Other/liantong/liantong-sh /Other/liantong/liantong-gz
+++ liantong-bj
menu = 北京聯通
title = 北京聯通
alerts = someloss
host = 61.135.169.121
+++ liantong-hlj
menu = 黑龍江聯通
title = 黑龍江聯通
alerts = someloss
host = 202.97.224.69
+++ liantong-tj
menu = 天津聯通
title = 天津聯通
alerts = someloss
host = 202.99.96.68
+++ liantong-sc
menu = 四川聯通
title = 四川聯通
alerts = someloss
host = 119.6.6.6
+++ liantong-sh
menu = 上海聯通
title = 上海聯通
alerts = someloss
host = 210.22.84.3
+++ liantong-gz
menu = 廣東聯通
title = 廣東聯通
alerts = someloss
host = 221.5.88.88
++ yidong
menu = 移動網絡監控
title = 移動網絡監控列表
host = /Other/yidong/yidong-bj /Other/yidong/yidong-hlj /Other/yidong/yidong-tj /Other/yidong/yidong-sc /Other/yidong/yidong-sh /Other/yidong/yidong-gz
+++ yidong-bj
menu = 北京移動
title = 北京移動
alerts = someloss
host = 221.130.33.52
+++ yidong-hlj
menu = 黑龍江移動
title = 黑龍江移動
alerts = someloss
host = 211.137.241.35
+++ yidong-tj
menu = 天津移動
title = 天津移動
alerts = someloss
host = 211.137.160.5
+++ yidong-sc
menu = 四川移動
title = 四川移動
alerts = someloss
host = 218.201.4.3
+++ yidong-gz
menu = 廣東移動
title = 廣東移動
alerts = someloss
host = 211.136.192.6
第六步 啟動Apache、smokeping和設置環境變量
/etc/init.d/httpd start
/usr/local/smokeping/bin/smokeping
echo ‘export PATH=/usr/local/smokeping/bin/:$PATH‘ >> /etc/profile
第七步 瀏覽器地址欄輸入服務器的IP地址+/smokeping即可查看。
本文出自 “wenjia.hao” 博客,轉載請與作者聯系!
centos6安裝smokeping