Chinaunix首页 | 论坛 | 博客
  • 博客访问: 382281
  • 博文数量: 87
  • 博客积分: 2810
  • 博客等级: 少校
  • 技术积分: 825
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-28 22:34
文章分类

全部博文(87)

文章存档

2010年(25)

2009年(43)

2008年(19)

分类: LINUX

2009-11-10 20:31:33

Install needed packages

rrdtool

yum install rrdtool

perl-CGI-SpeedyCGI

yum install perl-CGI-SpeedyCGI

fping

yum install fping

Or do them all together:
yum install rrdtool perl-CGI-SpeedyCGI fping

Smokeping
wget ~oetiker/webtools/smokeping/pub/smokeping-2.0.9.tar.gz
tar xvzf smokeping-2.0.9.tar.gz
mv smokeping-2.0.9 /usr/local/smokeping
chown -R root:root /usr/local/smokeping

cd /usr/local/smokeping/bin
for foo in *.dist; do cp $foo `basename $foo .dist`; done

cd /usr/local/smokeping/etc/
for foo in *.dist; do cp $foo `basename $foo .dist`; done

cd /usr/local/smokeping/htdocs
for foo in *.dist; do cp $foo `basename $foo .dist`; done

pico /usr/local/smokeping/bin/smokeping
Default New
#!/usr/sepp/bin/perl-5.8.4 -w #!/usr/bin/perl -w

use lib qw(/usr/pack/rrdtool-1.0.49-to/lib/perl); use lib qw(/usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi/auto/RRDs);
or if a i386 system use
use lib qw(/usr/pack/rrdtool-1.0.49-to/lib/perl); use lib qw(/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/auto/RRDs);
use lib qw(lib); use lib qw(/usr/local/smokeping/lib);

use Smokeping 2.000008;

Smokeping::main("etc/config.dist"); Smokeping::main("/usr/local/smokeping/etc/config");

pico /usr/local/smokeping/htdocs/smokeping.cgi

Default New
#!/usr/sepp/bin/speedy -w #!/usr/bin/speedy -w

use lib qw(/usr/pack/rrdtool-1.0.33-to/lib/perl); use lib qw(/usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi/auto/RRDs);
or if a i386 system use
use lib qw(/usr/pack/rrdtool-1.0.49-to/lib/perl); use lib qw(/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/auto/RRDs);
use lib qw(/home/oetiker/data/projects/AADJ-smokeping/dist/lib); use lib qw(/usr/local/smokeping/lib);
use CGI::Carp qw(fatalsToBrowser);

use Smokeping 2.000008;

Smokeping::cgi("/home/oetiker/data/projects/AADJ-smokeping/dist/etc/config"); Smokeping::cgi("/usr/local/smokeping/etc/config");

cp /usr/local/smokeping/htdocs/smokeping.cgi /var/www/cgi-bin

pico /usr/local/smokeping/etc/config

etc/config
*** General ***
Default New
owner = Joe Random owner = Tony Someone
contact = joe@some.place.xyz contact = tony@somehhere
mailhost = smtp.mailhost.abc mailhost = smtp.somewhere
sendmail = /usr/lib/sendmail
imgcache = /home/oetiker/public_html/.simg imgcache = /var/www/html/smokeping/img
imgurl = ../.simg imgurl =
datadir = /home/oetiker/data/projects/AADJ-smokeping/dist/var datadir = /usr/local/smokeping/var
piddir = /home/oetiker/data/projects/AADJ-smokeping/dist/var piddir = /usr/local/smokeping/var
cgiurl = ~oetiker/smokeping/smokeping.cgi cgiurl =
smokemail = /home/oetiker/data/projects/AADJ-smokeping/dist/etc/smokemail.dist smokemail = /usr/local/smokeping/etc/smokemail
tmail = /home/oetiker/data/projects/AADJ-smokeping/dist/etc/tmail.dist tmail = /usr/local/smokeping/etc/tmail

syslogfacility = local0

*** Alerts ***

to = to = someone@your.place
from = smokealert@ from = smokealert@your.smoke.server

*** Presentation ***

template = /home/oetiker/data/projects/AADJ-smokeping/dist/etc/basepage.html.dist template = /usr/local/smokeping/etc/basepage.html

*** Probes ***

binary = /usr/sepp/bin/fping binary = /usr/sbin/fping

For some strange reason I had to make this change to /usr/sbin/fping
chown apache /usr/sbin/fping

*** Targets ***

+ World
menu = World Connectivity
title= World Connectivity

++ New Zealand
menu = New Zealand Servers
title = New Zealand Server

+++ a Server
menu = My Server
title = My Server
host = something.newskies.net

mkdir -p /var/www/html/smokeping/img
chown -R apache:apache /var/www/html/smokeping/img

mkdir /usr/local/smokeping/var

/usr/local/smokeping/bin/smokeping &

#ps aux | grep smoke
root 8384 0.0 2.5 14976 3272 ? Ss May24 0:01 /usr/local/smokeping/bin/smokeping [FPing]
apache 8435 0.0 1.7 11100 2168 ? Ss May24 0:02 /usr/bin/speedy_backend -w /var/www/cgi-bin/smokeping.cgi
apache 8436 0.3 3.9 12648 5036 ? S May24 2:04 /usr/bin/speedy_backend -w /var/www/cgi-bin/smokeping.cgi

vi /etc/rc.d/rc.local
/usr/local/smokeping/bin/smokeping &
阅读(883) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~