CentOS 5.7下Cacti 0.8.7i安装

操作系统: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 发布

1.安装apache

1.1  cd /usr/local/src
1.2  wget
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,在浏览器输入:yourport,如果显示“it works!”说明安装成功。

2.安装snmp

2.1  centos自带有snmp,cacti需要php支持snmp的扩展,本人不知在编译php时如何引用系统的snmp,所以采取手动编译安装snmp的方法
2.2  wget wget
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。

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/0af4dec8db3be55a2473b890a1b1010b.html