nginx环境下的cacti配置
php+nginx的配置参考 http://dnuser.blog.运维网.com/4863891/1258322以前安装过apache和cacti的环境,但是现在的服务器直接采用的nginx,所以只能在nginx环境中配置cacti。
1、安装snmp
#yum -y install net-snmp net-snmp-devel net-snmp-libs net-snmp-utils
安装rrdtool
#yum -y install rrdtool
2、下载cacti最新版
#cd /soft/
#wget http://www.cacti.net/downloads/cacti-0.8.8a.tar.gz
解压
# tar -zxvf cacti-0.8.8a.tar.gz
# mv cacti-0.8.8a /var/www/
#cd /var/www/
#mv cacti-0.8.8a cacti
3.修改nginx配置
location /cacti {
root /var/www/cacti;
indexindex.php;
}
mysql数据库添加用户
creat database cacti;
grant all on cacti.* to cactiuser@localhost identified by 'cactipass';
use cacti;
source /var/www/cacti/cacti.sql
有时候打开页面出现类似下面的错误
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"
页:
[1]