CentOS 5 安装cacti (2)

 Cacti安装完成后,数据库能从命令行访问,但是访问http://ip/cacti/index.php时候总是提示:FATAL: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php' 。

看似php链接数据库的问题,其实是因SELinux模式导致。简单的方法是用命令:

#setenforce 0

关闭SELinux模式,就可以正常进入cacti的初始配置界面。算是解决了燃眉之急。

也有cacti与SELinux合作的文档,有时间再去研究。先把对象监控起来。

你可能感兴趣的:(centos,职场,cacti,休闲,config.php)