Based on CentOS 6.5 x86_64
1. yum -y install mysql-server php-mysql net-snmp-utils rrdtool php php-snmp httpd
2. cd /var/www/html
tar zxf cacti-0.8.8b.tar.gz
ln �Cs cacti-0.8.8b cacti
3. service mysqld start; chkconfig mysqld on
mysql_secure_installation
mysql -uroot -p
mysql> create database cacti;
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'CACTIUSER-PASS';
mysql> flush privileges;
mysql -p cacti < /var/www/html/cacti/cacti.sql
4. vi /var/www/html/cacti/include/config.php
5. useradd cactiuser
cd /var/www/html/cacti
chown �CR cactiuser rra/ log/
vi /etc/cron.d/cacti
*/5 * * * * cactiuser /usr/bin/php /var/www/html/cacti/poller.php > /dev/null 2>&1
service crond restart
6. yum -y install gcc mysql-devel net-snmp-devel autoconf automake libtool dos2unix
tar zxf cacti-spine-0.8.8b.tar.gz
cd cacti-spine-0.8.8b
./bootstrap
./configure && make && make install
cp /usr/local/spine/etc/spine.conf.dist /etc/spine.conf
vi /etc/spine.conf
ln -s /usr/local/spine/bin/spine /sbin/spine
7. vi /etc/hosts
vi /etc/httpd/conf/httpd.conf
ServerName xxx
service httpd start; chkconfig httpd on
8. to first configure cacti
http://<yourserver>/cacti/install
default login: admin/admin
9. some change to spine poller and snmp version
10. Cacti web url: http://<yourserver>/cacti
SNMP配置
[root@Centreon_Server ~]# vim /etc/snmp/snmpd.conf
--------------------------------------------------------------------------------------------------
41 com2sec notConfigUser 192.168.1.1 public #将default改为服务端IP地址或保留
62 access notConfigGroup "" any noauth exact all none none #将systemview改为all
85 view all included .1 80 #去除注释“#”号
--------------------------------------------------------------------------------------------------
service snmpd restart
chkconfig snmpd on