smokeping配置

smokeping需要rrdtool,因此,先安装rrdtool

 

1、获取rrdtool:

wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.5.4.tar.gz

 

2、解压

tar zxvf rrdtool-1.5.4.tar.gz

 

3、安装依赖

sudo yum -y install cairo-devel libxml2-devel pango-devel pango libpng-devel freetype freetype-devel libart_lgpl-devel perl-devel

 

4、编译安装

sudo ./configure --prefix=/opt/rrdtool-1.6.0

sudo make && sudo make install

 

注意:出现如下报错是没有安装perl-devel依赖

Can't locate ExtUtils/MakeMaker.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at Makefile.PL line 1.

BEGIN failed--compilation aborted at Makefile.PL line 1.

make[2]: *** [perl-piped] 错误 2

make[2]: Leaving directory `/root/rrdtool-1.5.4/bindings'

make[1]: *** [all-recursive] 错误 1

make[1]: Leaving directory `/root/rrdtool-1.5.4/bindings'

make: *** [all-recursive] 错误 1ech

 

安装依赖

sudo yum -y install perl-devel

 

5、重新安装

make clean

make

make install

 


rrdtool出图时中文乱码解决方法:

sudo yum install wqy-zenhei-fonts

cd /usr/share/fonts/

fc-cache -fv

 

6、下载somkeping

wget http://oss.oetiker.ch/smokeping/pub/smokeping-2.6.11.tar.gz

tar xf smokeping-2.6.11.tar.gz

 

7、安装smokeping的依赖

sudo yum install fping curl bind-utils perl rrdtool-perl -y

 

8、编译

./configure --prefix=/opt/smokeping

 


编译报错:

** Aborting Configure ******************************

 

If you know where perl can find the missing modules, set

the PERL5LIB environment variable accordingly.

 

FIRST though, make sure that 'perl' starts the perl

binary you want to use for SmokePing.

 

Now you can install local copies of the missing modules

by running

 

./setup/build-perl-modules.sh /opt/smokeping/thirdparty #运行该命令,安装perl模块

 

The RRDs perl module is part of RRDtool. Either use the rrdtool

package provided by your OS or install rrdtool from source.

If you install from source, the RRDs module is located

PREFIX/lib/perl

 

9、安装perl模块

sudo ./setup/build-perl-modules.sh /opt/smokeping/thirdparty

 

10、重新编译

sudo ./configure --prefix=/opt/smokeping

 

11、安装

/usr/bin/gmake install

 

12、配置调整

a.创建cache、data、var目录
cd /opt/smokeping
sudo mkdir cache data var
b.在创建日志
sudo touch /var/log/smokeping.log
c.授权
sudo chown apache:apache cache data var
sudo chown apache:apache /var/log/smokeping.log
sudo chown -R apache:apache /opt/smokeping #这一步非常重要,否则做M/S模式,Slave不出图
d.修改配置文件
sudo mv /opt/smokeping/htdocs/smokeping.fcgi.dist /opt/smokeping/htdocs/smokeping.fcgi
sudo mv /opt/smokeping/etc/config.dist /opt/smokeping/etc/config
vim /opt/smokeping/etc/config
cgiurl = http://host-ip/smokeping.cgi

 


13、安装apache

yum -y install httpd

 

14、修改apache配置文件

vi /etc/httpd/conf/httpd.conf


Alias /smokeping "/opt/smokeping/htdocs/smokeping.fcgi"
Alias /cache "/opt/smokeping/cache/"
Alias /cropper "/opt/smokeping/htdocs/cropper/"
<Directory "/opt/smokeping">
AllowOverride None
Options All
AddHandler cgi-script .fcgi .cgi
Order allow,deny
Allow from all
#AuthName "Smokeping"
#AuthType Basic
#AuthUserFile /usr/local/smokeping/htdocs/htpasswd
#Require valid-user
DirectoryIndex smokeping.fcgi
</Directory>

转载于:https://www.cnblogs.com/melody0812/p/5882810.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值