返回
编程
分类

1 安装http 及支持环境  www.2cto.com  ,RRDs.pm in @INC这个错误

日期: 2020-01-02 08:08 浏览次数 : 94

在使用RRDtool的Perl模块时,有时会发生Can't find RRDs.pm in @INC这个错误。

centos5.8安装配置smokeping 2.4.2

 

 

在RedHat和CentOS上可以尝试一下命令:

1 安装http 及支持环境  www.2cto.com  

 

  源

  1. yum instal rrdtool

  CentOS5-Base-163.repo

 

  rpm -ivh epel-release-5-4.noarch.rpm

  1. 必威官网亚洲体育 ,yum install rrdtool-perl

 

 

  yum install httpd httpd-devel

  1. yum install rrdtool-devel

  yum install rrdtool-perl

 

  yum install curl

  1. yum install rrdtool-utils

  yum install fping

 

  yum install perl-CGI-SpeedyCGI

上述4个命令总有一个能行,由于rrdtool的依赖包较多,所以还是把这些包依赖的问题交给yum去做吧。

 

find RRDs.pm in @INC这个错误。 在RedHat和CentOS上可以尝试一下命令: 1. yum instal rrdtool 2. yum install rr...

  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   =

  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*** 模块   www.2cto.com  

 

 

  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

 

2.4.2 1 安装http 及支持环境 www.2cto.com 源 CentOS5-Base-163.repo rpm -ivh epel-release-5-4.noarch.rpm yum install httpd httpd-devel yum inst...