CentOS 5.8 安装配置smokeping 2.4.2

Justypc 2012-12-13

1 安装http 及支持环境
  源
  CentOS5-Base-163.repo
  rpm -ivh epel-release-5-4.noarch.rpm

  yum install httpd httpd-devel
  yum install rrdtool-perl
  yum install curl
  yum install fping
  yum install perl-CGI-SpeedyCGI

  rpm -ivh echoping-5.2.0-1.2.el5.rf.x86_64.rpm
 
2 安装rrdtool库
  yum install libxml2-devel  libpng-devel pango  pango-devel libart_lgpl  libart_lgpl-devel freetype freetype-devel  fontconfig  cairo cairo-devel

  tar -zxvf rrdtool-1.2.26.tar.gz
  cd rrdtool-1.2.26
  ./configure --prefix=/usr/local/rrdtool
  make && make install

3 安装smokeping
  tar -zxvf smokeping-2.4.2.tar.gz
  mv smokeping-2.4.2 /usr/local/smokeping

4 修改配置文件
  vim /usr/local/smokeping/etc/config.dist
  10 imgcache = /usr/local/smokeping/cache
  11 imgurl  = /usr/local/smokeping/img
  12 datadir  = /usr/local/smokeping/data
  13 piddir  = /usr/local/smokeping/var
  14 cgiurl  = http://192.168.68.218/smokeping/htdocs/smokeping.cgi
  15 smokemail = /usr/local/smokeping/etc/smokemail.dist
  16 tmail = /usr/local/smokeping/etc/tmail.dist

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


  注销***slaves*** 模块

 


  cp /usr/local/smokeping/htdocs/smokeping.cgi.dist /usr/local/smokeping/htdocs/smokeping.cgi

  vim /usr/local/smokeping/htdocs/smokeping.cgi
  7  use lib qw(/usr/rrdtool/lib/perl);
  8  use lib qw(/usr/local/smokeping/lib);
  14 Smokeping::cgi("/usr/local/smokeping/etc/config.dist");

  vim /usr/local/smokeping/bin/smokeping.dist
  4  use lib qw(/usr/local/rrdtool/lib/perl);
  5  use lib qw(/usr/local/smokeping/lib);
  10 Smokeping::main("/usr/local/smokeping/etc/config.dist");

  vim /etc/httpd/conf/httpd.conf 
  265 ServerName localhost:80
  320 options Indexes FollowSymLinks  ExecCGI
  778 AddHandler cgi-script .cgi

  ln -s /usr/local/smokeping/htdocs/cropper /var/www/html/smokeping/cropper
  ln -s /usr/local/smokeping/htdocs/smokeping.cgi /var/www/html/smokeping/smokeping.cgi

  mkdir -p /var/www/html/smokeping/img /var/www/html/smokeping/script/ /usr/local/smokeping/data /usr/local/smokeping/var
 
  chown -R apache:apache /var/www/html/smokeping
  配置完成

5 问题解决
  a> Can't locate LWP/UserAgent.pm
   
    perl -MCPAN -eshell
    cpan> install Bundle::LWP


  b> Can't locate loadable object for module RRDs in @INC
    yum install rrdtool-perl

相关推荐