标签:smokeping安装
下面的脚本安装是在centos6的系统上执行的
iptables -F
iptables -X
service iptables save
sed -i ‘s/SELINUX=enforcing/SELINUX=disabled/g‘ /etc/selinux/config
setenforce 0
安装smoekping相关的依赖包
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
链接:http://pan.baidu.com/s/1nuOT4V3 密码:63n5
下载百度云盘里面的smokeping安装包,在要安装的centos系统里的root目录下解压,会得到三个软件包
解压并安装下面三个软件包
cd /root
tar zxvf fping-3.13.tar.gz
cd fping-3.13
./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.11.tar.gz
cd /root/smokeping-2.6.11/
./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
cd /usr/local/smokeping/etc
把百度云盘里的smoekping配置文件替换原来的配置文件
配置apacha
cat >> /etc/httpd/conf/httpd.conf << OFF
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>
OFF
cd /usr/local/smokeping/lib/Smokeping/
rm -rf Graphs.pm
wget http://zabbix.idc02.369cloud.com/base/Graphs.pm
echo "/usr/local/smokeping/bin/smokeping --logfile=/var/log/smokeping.log 2>&1 &" >> /etc/rc.local
/usr/local/smokeping/bin/smokeping --logfile=/var/log/smokeping.log 2>&1 &
service httpd restart
本文出自 “zhanguo1110” 博客,请务必保留此出处http://zhanguo1110.blog.51cto.com/5750817/1883909
标签:smokeping安装
原文地址:http://zhanguo1110.blog.51cto.com/5750817/1883909