手机版
你好,游客 登录 注册
背景:
阅读新闻

CentOS 5.7下Cacti 0.8.7i安装

[日期:2012-03-12] 来源:Linux社区  作者:willvvv [字体:大 中 小]

操作系统:CentOS release 5.7 (Final)
软件包:cacti-0.8.7i.tar.gz,net-snmp-5.7.1.tar.gz,php-5.3.10.tar.gz,mysql-5.1.58-linux-i686-glibc23.tar.gz,httpd-2.2.22.tar.gz

相关阅读:

系统监控平台Cacti 0.8.7i 发布 http://www.linuxidc.com/Linux/2011-12/49278.htm

1.安装apache

1.1  cd /usr/local/src
1.2  wget http://labs.renren.com/apache-mirror//httpd/httpd-2.4.1.tar.gz
1.3  tar zvxf httpd-2.2.22.tar.gz
1.4  cd httpd-2.2.22/srclib/apr
1.5  ./configure --prefix=/usr/local/apr
1.6  make && make install
1.7  cd ../apr-util
1.8  ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
1.9  make && make install
1.10 ./configure --prefix=/usr/local/apache --enable-so --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/bin --enable-mods-shared=all --with-mpm=worker --enable-cache --enable-disk-cache --enable-mem-cache --enable-file-cache
1.11 make && make install
1.12 vi /usr/local/apache/conf/httpd.conf修改以下参数:
    #
    # Listen: Allows you to bind Apache to specific IP addresses and/or
    # ports, instead of the default. See also the <VirtualHost>
    # directive.
    #
    # Change this to Listen on specific IP addresses as shown below to
    # prevent Apache from glomming onto all bound IP addresses.
    #
    #Listen 12.34.56.78:80
    Listen 9999(yourport)

    #
    # ServerName gives the name and port that the server uses to identify itself.
    # This can often be determined automatically, but we recommend you specify
    # it explicitly to prevent problems during startup.
    #
    # If your host doesn't have a registered DNS name, enter its IP address here.
    #
    ServerName 192.168.0.181:9999(yourhost:yourport)
1.13 执行 /usr/local/apache/bin/apachectl start,在浏览器输入http://yourip:yourport,如果显示“it works!”说明安装成功。

2.安装snmp

2.1  centos自带有snmp,cacti需要php支持snmp的扩展,本人不知在编译php时如何引用系统的snmp,所以采取手动编译安装snmp的方法
2.2  wget wget http://superb-sea2.dl.sourceforge.net/project/net-snmp/net-snmp/5.7.1/net-snmp-5.7.1.tar.gz
2.3  tar zvxf net-snmp-5.7.1.tar.gz
2.4  cd net-snmp-5.7.1
2.5  ./configure
2.6  make && make install
2.7  修改配置, vi /etc/snmp/snmpd.conf
    1、com2sec notConfigUser  default      public
    改为:com2sec notConfigUser (你想监控的那台机器的IP)    public
    2、access  notConfigGroup ""      any      noauth    exact  systemview  none  none
    改为:access  notConfigGroup ""      any      noauth    exact  all  none none
    3、#view all    included  .1        80
    将前面的 # 注释 去掉。
2.8  复制编译安装的snmp的库到系统库:cp /usr/local/lib/libnetsnmp.so.30 /usr/lib,否则会报libnetsnmp.so.30 not found
2.9  service snmpd restart

3.使用yum install 安装rrdtool,zlib,freetype,libpng,jpeg,libxml,gd,等。如yum install zlib。查看系统是否安装zlib的命令rpm -qa|grep zlib,卸载zlib命令rpm -e zlib。

linux
相关资讯       CACTI 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款