安装前需配置lamp/lnmp环境
Rrdtool安装
Rrdtool安装需要cairo、libxml2、pango库文件支持,所以我们先使用yum安装这几个库文件
#yum install cairo-devel libxml2-devel pangopango-devel
#tar zxvf rrdtool-1.4.4.tar.gz
#cd rrdtool-1.4.4
#./configure --prefix=/usr/local/rrdtool
#make && make install
#ln -s /usr/local/rrdtool/bin/* /usr/local/bin/
net-snmp安装
#tar zxvf net-snmp-5.4.3.tar.gz
#cd net-snmp-5.4.3
#./configure --prefix=/usr/local/net-snmp
#make && make install
#cp EXAMPLE.conf /usr/local/net-snmp/share/snmp/snmpd.conf
#ln -s /usr/local/net-snmp/bin/* /usr/local/bin/
#/usr/local/net-snmp/sbin/snmpd -c /usr/local/net-snmp/share/snmp/snmpd.conf//启动net-snmp
#echo“/usr/local/net-snmp/sbin/snmpd-c/usr/local/net-snmp/share/snmp/snmpd.conf”>>/etc/rc.local//加入开机启动
centos直接采用yum方式安装即可
yum –y install net-snmp net-snmp-utils
snmp的相关程序包
php-snmp-5.1.6-27.el5_5.3
net-snmp-libs-5.3.2.2-9.el5_5.1
net-snmp-utils-5.3.2.2-9.el5_5.1
net-snmp-5.3.2.2-9.el5_5.1
net-snmp-devel-5.3.2.2-9.el5_5.1
cacti安装配置
登录mysql服务器作出如下配置
mysql> create database cacti;
mysql> use cacti
mysql> grant all privileges on cacti.* to 'cacti'@'192.168.1.5' identified by 'cacti';
mysql> flush privileges;
mysql> source /tmp/cacti.sql (此文件放置于cacti解压目录下/usr/local/nginx/html/cacti-0.8.7d)
注:本环境mysql在独立的环境,若都集中一台可根据现实条件进行配置
cact配置
# vi /usr/local/webserver/include/config.php
解压cacti cp至web主站目录(此处web路径为/usr/local/webserver)
tar -zxvf cacti-0.8.7d.tar.gz
cp /usr/local/nginx/html/cacti-0.8.7d /usr/local/webserver/
cacti安装
http://localhost/install/