# uname -a Linux 10-6-8-200 2.6.32-279.22.1.el6.x86_64 #1 SMP Wed Feb 6 03:10:46 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
# rpm -ivh http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm yum install rrdtool -y
# yum install net-snmp net-snmp-libs net-snmp-utils
# vi /etc/snmp/snmpd.conf com2sec notConfigUser localhost public com2sec notConfigUser 127.0.0.1 public #access notConfigGroup "" any noauth exact systemview none none 去掉注释,并改为: access notConfigGroup "" any noauth exact all none none #view all included .1 80 去掉注释,即可;然后,保存退出启动snmp
# /etc/init.d/snmpd restart # snmpwalk -c public -v1 127.0.0.1 .1.3.6.1.2.1.25.2.3.1
yum install httpd php php-mysql php-snmp php-xml php-gd mysql mysql-server
# service httpd start # service mysqld start
# wget http://www.cacti.net/downloads/cacti-0.8.8b.tar.gz # tar zxf cacti-0.8.8b.tar.gz # mv cacti/ /var/www/html/ && cd /var/www/html/cacti
mysqladmin -uroot -p create cacti
9.导入数据库
mysql -uroot -p cacti < cacti.sql
mysql -uroot -p grant all on cacti.* to cacti@localhost identified by 'cactipasswd'; flush privileges;
# vi include/config.php $database_type = "mysql"; $database_default = "cacti"; $database_hostname = "localhost"; $database_username = "cacti"; $database_password = "cacti"; $database_port = "3306"; $database_ssl = false; //$url_path = "/cacti/";
# chown apache. /var/www/html/cacti -R # chmod +x /var/www/html/cacti/rra /var/www/html/cacti/resource /var/www/html/cacti/scripts/ -R
# echo "*/5 * * * * php /var/www/html/cacti/poller.php > /dev/null 2&>1“ >> /etc/crontab # /etc/init.d/crond restart
14.浏览器打开