centos6.4下安装cacti-0.8.8.b

环境:
# 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


1.安装rrdtool
# 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
2.安装net-snmp
# yum install net-snmp net-snmp-libs net-snmp-utils
3.编辑配置
# 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
4.重启服务并测试
# /etc/init.d/snmpd restart
# snmpwalk -c public -v1 127.0.0.1 .1.3.6.1.2.1.25.2.3.1
5.安装LAMP环境
yum install httpd php php-mysql php-snmp php-xml php-gd mysql mysql-server
6.启动服务
# service httpd start
# service mysqld start
7.下载cacti
# 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
8.创建数据库
mysqladmin -uroot -p create cacti

9.导入数据库

mysql -uroot -p cacti < cacti.sql

10.创建数据库用户
mysql -uroot -p
grant all on cacti.* to cacti@localhost identified by 'cactipasswd';
flush privileges;
11.修改配置
# 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/";
12.设置权限
# 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
13.配置计划任务
# echo "*/5 * * * * php /var/www/html/cacti/poller.php > /dev/null 2&>1“ >> /etc/crontab
# /etc/init.d/crond restart

14.浏览器打开

http://yourip/cacti
默认用户名:admin 默认密码:admin




你可能感兴趣的:(cacti-0.8.8b)