9/04/2013

Cacti installation by yum


Cacti installation by yum.

1. yum install httpd httpd-devel
2. yum install mysql-server mysql-devel
3. yum install php php-mysql php-pdo php-mbstring php-devel
4. /usr/bin/mysqladmin -u root password 'some_password'
5. /etc/init.d/mysqld start
6. mysql -u root -p
7. delete unnecessary users
8. mysql> create database cacti;
9. mysql> exit
10. mysql -u root -p cacti <  /usr/share/doc/cacti-0.8.8b/cacti.sql

11. access the http://cacti_IP:/cacti with your web browser.
The following error was displayed in my web browser.

Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'

I checked the web for the solution. the httpd user can't access to the db.php

chown -R apache:root /etc/cacti/db.php
chown -R apache:root /var/lib/cacti

Then, I can display the initial setup screen for cacti.
continues with the default value. then finished setup wizard.

I saw the login screen. The username and password should be 'admin'. But I couldn't log in.
I searched the web again and got the solution.
Edit the php.ini file and changed the following settings.

mysql> update user_auth set password=md5('admin') where username='admin'; 





No comments: