Install Cacti on Debian (newbie)

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
Juc1
Posts: 8
Joined: Sun Jul 29, 2012 4:56 am

Install Cacti on Debian (newbie)

Post by Juc1 »

Hi all,

I am trying to install cacti on my Debian 6 VPS. A couple of questions please :)

1) The instructions here http://www.debianhelp.co.uk/cacti.htm say
Point your web browser to: http://your-server/cacti/
When I do this - for example, http://255.764.781.153/cacti - the PHP file does not execute but instead a PHP file mentioning cacti is downloaded. If I try http://255.764.781.153/phpinfo.php, the PHP executes ok.

(not my real IP address but I can give it if it helps.)

Any suggestions please for why the PHP does not execute?


2) I think that the cacti config.php file should look like this http://www.yusufozturk.info/wp-content/ ... ture25.png
ie where you enter the database credentials but my /usr/share/cacti/site/include/config.php looks like this

Code: Select all

<?php
/*
 +-------------------------------------------------------------------------+
 | Copyright (C) 2004-2010 The Cacti Group...                                 |
 |                                                                         |
 |  +-------------------------------------------------------------------------+
 | http://www.cacti.net/                                                   |
 +-------------------------------------------------------------------------+
*/

/* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
require('/etc/cacti/debian.php');

/* Default session name - Session name must contain alpha characters */
#$cacti_session_name = "Cacti";

?>
Is this a Debian thing meaning that I enter the database credentials in etc/cacti/debian.php instead of /include/config.php?

Thank you
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Install Cacti on Debian (newbie)

Post by paulgevers »

Juc1 wrote:Is this a Debian thing meaning that I enter the database credentials in etc/cacti/debian.php instead of /include/config.php?
Yes.
Maintainer of cacti in Debian (and Ubuntu).
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Install Cacti on Debian (newbie)

Post by paulgevers »

Juc1 wrote:Any suggestions please for why the PHP does not execute?
What http deamon are you using? Apache? If so, please check the configuration. I believe (from the top of my head) that there should be a /etc/apache2/conf.d/cacti.conf file symlinked to /usr/share/doc/cacti/apache.conf
Maintainer of cacti in Debian (and Ubuntu).
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
Juc1
Posts: 8
Joined: Sun Jul 29, 2012 4:56 am

Re: Install Cacti on Debian (newbie)

Post by Juc1 »

paulgevers wrote: What http deamon are you using? Apache? If so, please check the configuration. I believe (from the top of my head) that there should be a /etc/apache2/conf.d/cacti.conf file symlinked to /usr/share/doc/cacti/apache.conf
@ paulgevers thanks for your reply. I think my PHP execution problem has been fixed by this:

Code: Select all

$ a2enmod php5
Enabling module php5.
Run '/etc/init.d/apache2 restart' to activate new configuration!
$ /etc/init.d/apache2 restart
Restarting web server: apache2 ... waiting .
$
Juc1
Posts: 8
Joined: Sun Jul 29, 2012 4:56 am

Re: Install Cacti on Debian (newbie)

Post by Juc1 »

paulgevers wrote:
Juc1 wrote:Is this a Debian thing meaning that I enter the database credentials in etc/cacti/debian.php instead of /include/config.php?
Yes.
OK thanks so my etc/cacti/debian.php looks like this

Code: Select all

<?php
##
## database access settings in php format
## automatically generated from /etc/dbconfig-common/cacti.conf
## by /usr/sbin/dbconfig-generate-include
## Fri, 17 Aug 2012 09:12:50 -0400
##
## by default this file is managed via ucf, so you shouldn't have to
## worry about manual changes being silently discarded.  *however*,
## you'll probably also want to edit the configuration file mentioned
## above too.
##
$database_username='cacti';
$database_password='my_password';
$basepath='';
$database_default='cacti';
$database_hostname='';
$database_port='';
$dbtype='mysql';
Can you please tell me do I need to edit anything here (such as database hostname which seems to be empty) or does this file look ok as it is?

Thanks
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Install Cacti on Debian (newbie)

Post by paulgevers »

Juc1 wrote:Can you please tell me do I need to edit anything here (such as database hostname which seems to be empty) or does this file look ok as it is?
I think that should work, just in case, mine working config looks like this:

Code: Select all

<?php
$database_username='cacti';
$database_password='something here';
$basepath='';
$database_default='cacti';
$database_hostname='localhost';
$database_port='3306';
$dbtype='mysql';
?>
Maintainer of cacti in Debian (and Ubuntu).
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests