cacti安装中的报错处理

Cacti网页访问时报错

如下信息:

cacti安装中的报错处理

这是时区没有设置所以提示这些信息

 

解决方法:

修改cactiglobal_constants.php配置文件在第二行加入下列内容

[[email protected] ~]# vim /usr/local/nginx/html/cacti/include/global_constants.php

date_default_timezone_set("Asia/Chongqing");

cacti安装中的报错处理


修改完之后又报错下面的信息:报错说缺少php扩展库

cacti安装中的报错处理

解决方法:

重新编译安装php加上--enable-sockets

[[email protected] php-5.3.28]# ./configure --prefix=/usr/local/php5 --with-gd --with-zlib --with-mysql=/usr/local/mysql/ --with-config-file-path=/usr/local/php5 --enable-mbstring --enable-fpm --with-jpeg-dir=/usr/lib --enable-sockets

如果加入这个选项在make编译时有出现下面的错误

cacti安装中的报错处理

解决办法

编辑/etc/ld.so.cong添加下列内容

[[email protected] ~]# vim /etc/ld.so.conf

/usr/local/lib

cacti安装中的报错处理

添加完使用ldconfig生效一下

[[email protected] ~]# ldconfig

 

生效完以后按下面操作

[[email protected] ~]# cp /usr/src/php-5.3.28/ext/phar/phar.php

[[email protected] ~]# cd /usr/src/php-5.3.28/ext/phar/

[[email protected] phar]# pwd

/usr/src/php-5.3.28/ext/phar

[[email protected] phar]# cp ./phar.php ./phar.phar

cp:是否覆盖"./phar.phar"y

[[email protected] phar]# cd /usr/src/php-5.3.28/

[[email protected] php-5.3.28]# make

 

Build complete.

Don't forget to run 'make test'. //还是报错执行make test

 

[[email protected] php-5.3.28]# make test 

cacti安装中的报错处理


当黄色方框内走完就可以执行make install

cacti安装中的报错处理
cacti安装中的报错处理

Make install 完成之后记得重启apachephp-fpm否则网页访问时会出现报错日志之类的东西。