ubuntu14.04下部署smokeping监控软件

1.安装smokeping软件

 sudo apt-get install smokeping -y

2.编辑smokeping配置文件,不发送报警邮件。如有需要,可以后续添加。

sudo vim /etc/smokeping/config.d/pathnames
#sendmail = /usr/sbin/sendmail
sudo nano /etc/smokeping/config.d/General
cgiurl = http://your-ip/cgi-bin/smokeping.cgi

3.编辑apache配置文件。

sudo vim /etc/apache2/conf-available/serve-cgi-bin.conf

        
                Define ENABLE_USR_LIB_CGI_BIN
        

        
                Define ENABLE_USR_LIB_CGI_BIN
        

        
                ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
                
                        AllowOverride None
                        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                        Require all granted
                 
                        ScriptAlias /smokeping/smokeping.cgi /usr/lib/cgi-bin/smokeping.cgi
                        Alias /smokeping /usr/share/smokeping/www
                 
                        Options FollowSymLinks
                
        


# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

4.重启cgi,apache,smokeping

sudo a2enmod cgi
sudo service apache2 restart
sudo service smokeping restart

5,总结
笔者亲测使用centos部署相当麻烦,依赖包都需要十几个。 用ubuntu部署smokeping,只需要几行命令就可以搞定。

你可能感兴趣的:(运维)