Linux安全网 - Linux操作系统_Linux 命令_Linux教程_Linux黑客

会员投稿 投稿指南 本期推荐: 强烈推荐:Ylmf OS 3.0 正式版发布附迅雷高 XP系统下硬盘安装Fedora 14图文教程
搜索:
您的位置: Linux安全网 > Linux入门 > » 正文

smokeping安装使用配置总结---一灯

来源: 未知 分享至:

smokeping安装使用配置总结---一灯

普通安装:
centos 5.4下安装smokeping
需要的软件:
(1)httpd
(2)rrdtool
(3)smokeping
(4)fping
(5)libwww-perl

yum安装依赖包和apache和perl
yum -y install  gcc libart_lgpl* zlib* libpng*  freetype* libxml* pango*   httpd*  perl*


wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.3.1.tar.gz
tar zxvf rrdtool-1.3.1.tar.gz
cd rrdtool-1.3.1
./configure
make&&make install &&cd ..


wget http://fping.sourceforge.net/download/fping.tar.gz
#Install fping
tar zxvf fping.tar.gz
cd fping-2.4b2_to/
./configure
make&&make install &&cd ..

wget http://www.cpan.org/modules/by-authors/id/H/HO/HORROCKS/CGI-SpeedyCGI-2.22.tar.gz
#Install CGI-SpeedyCGI
tar -zxvf CGI-SpeedyCGI-2.22.tar.gz
cd CGI-SpeedyCGI-2.22
perl Makefile.PL
Compile mod_speedycgi (default no)? no
make && make install&&cd ..

#Install Perl modules libwww-perl
wget http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/libwww-perl-5.836.tar.gz
tar -zxvf libwww-perl-5.836.tar.gz
cd libwww-perl-5.836
perl Makefile.PL
make && make install&&cd ..

wget http://oss.oetiker.ch/smokeping/pub/smokeping-2.4.2.tar.gz
tar -zxvf smokeping-2.4.2.tar.gz
mv smokeping-2.4.2 /usr/local/smokeping


修改smokeping&httpd配置文件
mkdir -p /usr/local/smokeping/htdocs/cacheandimg
mkdir -p /usr/local/smokeping/var


配置:-------------------------------------------------------------------
修改文件一:++++++++++++++++++
cp /usr/local/smokeping/bin/smokeping.dist /usr/local/smokeping/bin/smokeping

修改文件smokeping中一下三行:
use lib qw(/usr/lib/perl5);
use lib qw(/usr/local/smokeping/lib);
Smokeping::main("/usr/local/smokeping/etc/config");

修改文件二:++++++++++++++++++
cp /usr/local/smokeping/etc/config.dist /usr/local/smokeping/etc/config

修改config文件中对应行:---------

#sendmail = /usr/lib/sendmail------------------>注释掉

imgcache = /usr/local/smokeping/htdocs/cacheandimg 
imgurl   = http://本机IP/cacheandimg    
datadir  = /usr/local/smokeping/var
piddir  = /usr/local/smokeping/var  
cgiurl   = http://本机IP/smokeping.cgi  
smokemail = /usr/local/smokeping/etc/smokemail.dist 
tmail = /usr/local/smokeping/etc/tmail.dist 

template = /usr/local/smokeping/etc/basepage.html.dist 

binary = /usr/local/sbin/fping 

secrets=/usr/local/smokeping/etc/smokeping_secrets.dist


修改文件三:++++++++++++++++++
cp /usr/local/smokeping/htdocs/smokeping.cgi.dist /usr/local/smokeping/htdocs/smokeping.cgi


修改文件smokeping.cgi

use lib qw(/usr/lib/perl5/);  
use lib qw(/usr/local/smokeping/lib); 
Smokeping::cgi("/usr/local/smokeping/etc/config");

 

修改apache配置文件
httpd添加如下
ScriptAlias /smokeping.cgi "/usr/local/smokeping/htdocs/smokeping.cgi"
alias /cacheandimg "/usr/local/smokeping/htdocs/cacheandimg"
<Directory "/usr/local/smokeping/htdocs">
AllowOverride None
AddHandler cgi-script cgi
Options ExecCGI
</Directory>


设置文件权限:
1.文件属性必须400

chmod 400 /usr/local/smokeping/etc/smokeping_secrets.dist 


2.修改文件所属组
chown -R apache.apache /usr/local/smokeping


启动
service iptables stop
chmod 755 /usr/local/smokeping/bin/smokeping
/usr/local/smokeping/bin/smokeping start
/etc/init.d/httpd start

ps -ef|grep smokeping

测试访问网站
http://服务器ip/smokeping.cgi


 


Tags:
分享至:
最新图文资讯
1 2 3 4 5 6
验证码:点击我更换图片 理智评论文明上网,拒绝恶意谩骂 用户名:
关于我们 - 联系我们 - 广告服务 - 友情链接 - 网站地图 - 版权声明 - 发展历史