[HOWTO] Cacti Install Guide CentOS 6 - 64

If you figure out how to do something interesting/cool in Cacti and want to share it with the community, please post your experience here.

Moderators: Developers, Moderators

timlee
Posts: 4
Joined: Wed Jul 22, 2015 12:00 am

Re: [HOWTO] Cacti Install Guide CentOS 6 - 64

Post by timlee »

Hi, I am trying to install cacti on my VM using CentOS6.5

I followed the guide you provided however I keep having the same error trying to access the WebUI.

FATAL: Cannot connect to MySQL server on 'cacti-cent6.localdomain'. Please make sure you have specified a valid MySQL database name in 'include/config.php'

Please help!

I have tried various config and restarted the services including httpd & mysqld, flush iptables...
but results are the same...

Code: Select all

[root@cacti-cent6 ~]# vi /etc/cacti/db.php
======output omitted========
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "cacti-cent6.localdomain";
$database_username = "cacti";
$database_password = "cacti";
$database_port = "3306";
$database_ssl = false;

Code: Select all

[root@cacti-cent6 ~]# vi /etc/cacti/db.php
======output omitted========
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "cacti-cent6.localdomain";
$database_username = "root";
$database_password = "password";
$database_port = "3306";
$database_ssl = false;
timlee
Posts: 4
Joined: Wed Jul 22, 2015 12:00 am

Re: [HOWTO] Cacti Install Guide CentOS 6 - 64

Post by timlee »

timlee wrote:Hi, I am trying to install cacti on my VM using CentOS6.5

I followed the guide you provided however I keep having the same error trying to access the WebUI.

FATAL: Cannot connect to MySQL server on 'cacti-cent6.localdomain'. Please make sure you have specified a valid MySQL database name in 'include/config.php'

Please help!

I have tried various config and restarted the services including httpd & mysqld, flush iptables...
but results are the same...

Code: Select all

[root@cacti-cent6 ~]# vi /etc/cacti/db.php
======output omitted========
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "cacti-cent6.localdomain";
$database_username = "cacti";
$database_password = "cacti";
$database_port = "3306";
$database_ssl = false;

Code: Select all

[root@cacti-cent6 ~]# vi /etc/cacti/db.php
======output omitted========
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "cacti-cent6.localdomain";
$database_username = "root";
$database_password = "password";
$database_port = "3306";
$database_ssl = false;
Hi all,

I found out the answer to my own question... The problem lies with the local loopback, I need to set it as

Code: Select all

127.0.0.1               localhost.localdomain localhost
in the /etc/hosts.

This was not mentioned in any guide. Hope someone will find it useful :D
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: [HOWTO] Cacti Install Guide CentOS 6 - 64

Post by phalek »

how about changing cacti-cent6.localdomain to localhost ?
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
timlee
Posts: 4
Joined: Wed Jul 22, 2015 12:00 am

Re: [HOWTO] Cacti Install Guide CentOS 6 - 64

Post by timlee »

phalek wrote:how about changing cacti-cent6.localdomain to localhost ?
Tried that and it doesn't work.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: [HOWTO] Cacti Install Guide CentOS 6 - 64

Post by phalek »

what about a simple 127.0.0.1 ?
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
timlee
Posts: 4
Joined: Wed Jul 22, 2015 12:00 am

Re: [HOWTO] Cacti Install Guide CentOS 6 - 64

Post by timlee »

phalek wrote:what about a simple 127.0.0.1 ?
Hi phalek,

This works too. Thanks!
xmanvu
Posts: 5
Joined: Wed Feb 17, 2016 5:26 am

Re: [HOWTO] Cacti Install Guide CentOS 6 - 64

Post by xmanvu »

hi,

thank for tourial , i installed cacti but when install plugin realtime have problem.
# cd /usr/share/cacti/plugins/realtime

Create a new directory called “temp”
# mkdir temp

Set the permissions on the new directory to be writable by all
# chmod 777 temp
but Realtime pop up all say :
The Image Cache Directory is not writable. Please set permissions and then attempt to open another realtime graph.
After changed The Image Cache Director as link below that working .

http://www.itechlounge.net/2013/11/linu ... ?mode=list

Console > Settings > Misc > Cache Directory

The default path is :

/var/www/html/cache/


Make sure the directory is writable :


chmod 777 /var/www/html/cache/
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: [HOWTO] Cacti Install Guide CentOS 6 - 64

Post by phalek »

Seems like you missed this step from the guide:

Code: Select all

6.	In the “Realtime Graphs” section input “/usr/share/cacti/plugins/realtime/temp” in the “Cache Directory”
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
xmanvu
Posts: 5
Joined: Wed Feb 17, 2016 5:26 am

Re: [HOWTO] Cacti Install Guide CentOS 6 - 64

Post by xmanvu »

phalek wrote:Seems like you missed this step from the guide:

Code: Select all

6.	In the “Realtime Graphs” section input “/usr/share/cacti/plugins/realtime/temp” in the “Cache Directory”
Dear Phalek,

I did it, try many times but no work.Please check pic.

6. In the “Realtime Graphs” section input “/usr/share/cacti/plugins/realtime/temp” in the “Cache Directory”
7. Click “Save”
8. Check that the “Cache Directory” now shows “[OK: DIR FOUND]”
Attachments
cacti.PNG
cacti.PNG (114.93 KiB) Viewed 4632 times
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: [HOWTO] Cacti Install Guide CentOS 6 - 64

Post by phalek »

Your temp dir is not 777, but only 775 ....
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
xmanvu
Posts: 5
Joined: Wed Feb 17, 2016 5:26 am

Re: [HOWTO] Cacti Install Guide CentOS 6 - 64

Post by xmanvu »

phalek wrote:Your temp dir is not 777, but only 775 ....
Hi Phalek,

I try changed 775 to 777 or anythings. No working.
Attachments
cacti 2.PNG
cacti 2.PNG (120.36 KiB) Viewed 4631 times
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: [HOWTO] Cacti Install Guide CentOS 6 - 64

Post by phalek »

It's usually a permission issue then. I suggest you do a

Code: Select all

chown -R apache /usr/share/cacti/plugins/
And test again. Apache may simply not be able to get to the plugins directory. Maybe one of the parent directory of that temp dir doesn't have the correct permissions for apache to access ...
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
xmanvu
Posts: 5
Joined: Wed Feb 17, 2016 5:26 am

Re: [HOWTO] Cacti Install Guide CentOS 6 - 64

Post by xmanvu »

phalek wrote:It's usually a permission issue then. I suggest you do a

Code: Select all

chown -R apache /usr/share/cacti/plugins/
And test again. Apache may simply not be able to get to the plugins directory. Maybe one of the parent directory of that temp dir doesn't have the correct permissions for apache to access ...
Hi, Phalek,

Nothing changed.
Attachments
cacti3.PNG
cacti3.PNG (148.57 KiB) Viewed 4631 times
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests