wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.7.tar.gz tar zxvf rrdtool-1.4.7.tar.gz cd rrdtool-1.4.7 ./configure --prefix=/usr/local/rrdtool make && make install
安装cgilib
1 2 3 4 5 6
wget http://down1.chinaunix.net/distfiles/cgilib-0.5.tar.gz tar zxvf cgilib-0.5.tar.gz cd cgilib-0.5 make cp libcgi.a /usr/local/lib cp cgi.h /usr/include
安装fping-2.4b2_to
1 2 3 4 5 6 7
wget http://fping.sourceforge.net/download/fping.tar.gz tar zxvf fping.tar.gz cd fping-2.4b2_to ./configure make make check make install
安装echoping
1 2 3 4 5 6 7
wget http://jaist.dl.sourceforge.net/project/echoping/echoping/6.0.0/echoping-6.0.0.tar.gz tar zxvf echoping-6.0.0.tar.gz cd echoping-6.0.0 ./configure --without-libidn make make test #遇到测试不成功等信息也没关系,直接ctrl+c回到命令行 make install
安装FCGI
1 2 3 4 5
wget http://cpan.communilink.net/authors/id/F/FL/FLORA/FCGI-0.74.tar.gz tar zxvf FCGI-0.74.tar.gz cd FCGI-0.74 perl Makefile.PL make && make install
安装mod_fastcgi,dso方式
1 2 3 4 5
wget http://www.fastcgi.com/dist/mod_fastcgi-2.4.6.tar.gz tar zxvf mod_fastcgi-2.4.6.tar.gz cd mod_fastcgi-2.4.6 apxs -o mod_fastcgi.so -c *.c apxs -i -a -n fastcgi .libs/mod_fastcgi.so
修改apache配置文件,确认有如下一行,没有则添加
1
LoadModule fastcgi_module modules/mod_fastcgi.so
安装SMokePing
1 2 3
wget http://oss.oetiker.ch/smokeping/pub/smokeping-2.6.8.tar.gz tar zxvf smokeping-2.6.8.tar.gz ./configure --prefix=/usr/local/smokeping
checking checking for perl module 'RRDs'... Failed checking checking for perl module 'FCGI'... Ok checking checking for perl module 'CGI'... Ok checking checking for perl module 'CGI::Fast'... Ok checking checking for perl module 'Config::Grammar'... Failed checking checking for perl module 'Digest::HMAC_MD5'... Failed checking checking for perl module 'LWP'... Ok ** 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 /usr/local/smokeping/thirdparty 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
先解决”checking checking for perl module ‘RRDs’… Failed”的问题,由于我们是编译安装的rrdtool,所以perl没找到默认路径下它的模块,需要手工拷贝过去
cd /usr/local/smokeping/ mkdir cache data var chown apache.apache cache data var cd /usr/local/smokeping/htdocs/ cp smokeping.fcgi.dist smokeping.fcgi cd /usr/local/smokeping/etc/ cp config.dist config chmod 400 /usr/local/smokeping/etc/smokeping_secrets.dist ln -s /usr/local/smokeping/cache /usr/local/smokeping/htdocs/cache
修改/usr/local/smokeping/etc/config
1 2 3 4
vi /usr/local/smokeping/etc/config 找到binary = /usr/sbin/fping 修改为binary = /usr/local/sbin/fping /usr/local/sbin/fping
Alias /smokeping/ "/usr/local/smokeping/htdocs/" AllowOverride None Options All AddHandler cgi-script .fcgi .cgi Order allow,deny Allow from all DirectoryIndex smokeping.fcgi