以前安装过apache和cacti的环境,但是现在的服务器直接采用的nginx,所以只能在nginx环境中配置cacti。
1、安装snmp [iyunv@localhost]#yum -y install net-snmp net-snmp-devel net-snmp-libs net-snmp-utils 安装rrdtool [iyunv@localhost]#yum -y install rrdtool 2、下载cacti最新版 [iyunv@localhost]#cd /soft/ #wget http://www.cacti.net/downloads/cacti-0.8.8a.tar.gz 解压 [iyunv@localhost soft]# tar -zxvf cacti-0.8.8a.tar.gz [iyunv@localhost soft]# mv cacti-0.8.8a /var/www/ [iyunv@localhost soft]#cd /var/www/ [iyunv@localhost soft]#mv cacti-0.8.8a cacti 3.修改nginx配置 location /cacti { root /var/www/cacti; index index.php; }
mysql数据库添加用户 grant all on cacti.* to cactiuser@localhost identified by 'cactipass';
出现错误
date(): It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘Asia/Chongqing’ for ‘CST/8.0/no DST’ instead 解决办法,在php.ini里加上 date.timezone = "Asia/Shanghai"
|