您当前所在位置:首页nginxsmokeping 安装与配置

smokeping 安装与配置

更新:2022-05-23 13:52:01编辑:Story归类:nginx人气:214

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

成长的对话版权声明:以上内容作者已申请原创保护,未经允许不得转载,侵权必究!授权事宜、对本内容有异议或投诉,敬请联系网站管理员,我们将尽快回复您,谢谢合作!

ttserver+nginx构建高并发高可用性应用 zimbra的使用与管理