smokeping 安装与配置

  • A+
所属分类:web应用

http://www.joecen.com/2008/10/09/use-smokeping/    smokeping的介绍

搭建的目的:

smokeping 有一个快照的功能,在一段时间能能够自然存取快照,

平常我们网络问题,发给机房一个mtr的截图,机房不会给予理会,或是反馈一个是网络没有问题,但是对于我们来说就很不方便

参考:

http://slog.carlheaton.co.uk/index.php/2009/06/centos-5-3-smokeping-2-4-2-install-quick/

环境:

[root@mail etc]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.6 (Tikanga)
安装步骤:
1安装 fping

[sourcecode lanage="shell"]
wget http://dag.wieers.com/rpm/packages/fping/fping-2.4-1.b2.2.el5.rf.x86_64.rpm
[/sourcecode]

2 安装CGI-SpeedyCGI

[sourcecode language="perl"]
wget http://fossies.org/unix/www/CGI-SpeedyCGI-2.22.tar.gz
tar zxvf CGI-SpeedyCGI-2.22.tar.gz
cd CGI-SpeedyCGI-2.22
perl Makefile.PL
make
make test
make install
[/sourcecode]

3 安装
freetype-devel
zlib-devel
libpng-devel
libart_lgpl

[sourcecode lanage="shell"]
yum install -y freetype-devel zlib-devel libpng-devel libart_lgpl
[/sourcecode]

4 安装rrdtool

[sourcecode lanage="shell"]
wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.2.26.tar.gz

cd rrdtool-1.2.26
./configure --prefix=/usr/local/rrdtool
make
make install
[/sourcecode]

5 安装smokeping

[sourcecode lanage="shell"]
wget http://oss.oetiker.ch/smokeping/pub/smokeping-2.4.2.tar.gz

tar xvzf smokeping-2.4.2.tar.gz
mv smokeping-2.4.2 /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
vi /usr/local/smokeping/bin/smokeping

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

#vi /usr/local/smokeping/etc/config

imgcache = /var/www/html/smokeping/img
imgurl = http://118.194.161.116/smokeping/img
datadir = /usr/local/smokeping/var
piddir = /tmp/smokeping-ms/var
cgiurl = http://118.194.161.116/cgi-bin/smokeping.cgi
smokemail = /usr/local/smokeping/etc/smokemail
tmail = /usr/local/smokeping/etc/tmail

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

#mkdir -p /var/www/html/smokeping/img

#chown -R apache:apache /var/www/html/smokeping/img

#mkdir /usr/local/smokeping/var

#chmod 400 /usr/local/smokeping/etc/smokeping_secrets.dist     -----这个如果没有更改的话,会报错误,可以试下。

#/usr/local/smokeping/bin/smokeping &
[/sourcecode]

到这里几乎是已经安装的差不多了
现在就是页面的一些配置

[sourcecode lanage="shell"]
vi /etc/httpd/conf/httpd.conf

Listen 8001
<VirtualHost *:8001>
DocumentRoot /usr/local/smokeping
ServerName 118.194.161.116
AddHandler cgi-script .cgi
<Directory "/usr/local/smokeping/htdocs/">
AllowOverride None
Options ExecCGI Indexes
Order allow,deny
Allow from all
</Directory>
ErrorLog logs/ping-error_log
CustomLog logs/ping-access_log common
</VirtualHost>
[/sourcecode]

因为80端口被占用了,现在临时用一个8001端口

[sourcecode lanage="shell"]
#/etc/init.d/httpd restart
[/sourcecode]

访问:http://118.194.161.116:8001/cgi-bin/smokeping.cgi

weinxin
微信公众号
扫一扫关注运维生存时间公众号,获取最新技术文章~

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

目前评论:2   其中:访客  2   博主  0

    • Clouds 9

      白开这文档不全啊,我被坑死了,折腾好久。

        • TSA 9

          @Clouds 这文档北京 – 精灵写的,有问题可以在群里请教他。