# yum install net-snmp-utils php-snmp net-snmp-libs
# vi /etc/snmp/snmpd.conf
------------> append <----------------
.
.
com2sec local localhost public
group MyRWGroup v1 local
group MyRWGroup v2c local
group MyRWGroup usm local
view all included .1 80
access MyRWGroup "" any noauth exact all all none
syslocation Unknown (edit /etc/snmp/snmpd.conf)
syscontact Root (configure /etc/snmp/snmp.local.conf)
pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat
------------------------------------
# /etc/init.d/snmpd start
# chkconfig snmpd on
# snmpwalk -v 1 -c public localhost IP-MIB::ipAdEntIfIndex
(output)
IP-MIB::ipAdEntIfIndex.your.ip.address = INTEGER: 2
IP_MIB::ipAdEntIfIndex.127.0.0.1 = INTEGER: 1
# cd /usr/local/src
# wget http://www.cacti.net/downloads/cacti-0.8.7g.tar.gz
# tar xzfv cacti-0.8.7g.tar.gz
# cp -Rf cacti-0.8.7g /usr/local/cacti/
# ln -s /usr/local/cacti/ /usr/local/apache/htdocs/cacti
# vi /usr/local/cacti/include/config.php
--------------->modify<------------------
#database_type = "mysql";
#database_default = "cacti";
$database_hostname = "127.0.0.1";
$database_username = "cacti";
$database_password = "password";
$database_port = "3306";
------------------------------------------
# mysql -u root -p cacti < /usr/local/cacti/cacti.sql
# crontab -e
-------------->append<----------------
*/5 * * * * php /usr/local/cacti/poller.php > /dev/null 2>&1
----------------------------------------
# service crond restart
go to http://your.ip.address/cacti/
click 'Next'
choose 'New Install' and click 'Next'
if all of Path is [FOUND], click 'Finish'
if you show "[NOT FOUND] PHP Binary Path", install php-cli
# yum install php-cli
Username: admin
Password: admin