Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


DEBIAN SARGE CACTI INSTALL HOWTO
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Help: Linux/Unix Specific
Author Message
prefetch



Joined: 01 Sep 2005
Posts: 11

PostPosted: Fri Sep 02, 2005 11:30 am    Post subject: DEBIAN SARGE CACTI INSTALL HOWTO Reply with quote

# assume a fresh sarge installation

this works on a fresh install, so YMMV if you've got one with cruft already in it.

aptitude install cacti
(takes a while - will install apache, php4, mysql - and ask you some questions - just default on all of them. when it asks you about names and passwds, use 'cacti' for everything.)

(also, the message about "libphp-adodb isn't longer installed in /usr/lib/adodb. etc." doesn't seem to be valid - so for now, ignore it.)

adduser cacti

mysqladmin --user=root create cacti

mysql -u root -e "grant all privileges on cacti.* to cacti@localhost identified by 'cacti'; flush privileges;"

zcat /usr/share/doc/cacti/cacti.sql.gz | mysql -u cacti --password=cacti cacti

echo "extension=mysql.so" >> /etc/php4/apache/php.ini

/etc/init.d/apache restart
(not sure if you actually have to do this step, but it won't hurt.)

got to http://localhost/cacti
click on okay for everything until you get to the main page.
click on the "graphs" tab.
you will see some broken looking stuff.
wait for 10 whole minutes, hit refresh and you will see nice graphs.

that's it.
Back to top
gg234
Cacti User


Joined: 07 Oct 2005
Posts: 62

PostPosted: Fri Oct 07, 2005 11:17 am    Post subject: Reply with quote

Hi,

I have just installed the cacti package from debian site.then i went to my browser i am getting following error message

Warning: mysql_connect(): Access denied for user 'cacti'@'localhost' (using password: YES) in /usr/share/cacti/site/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Access denied for user 'cacti'@'localhost' (using password: YES) in /usr/share/cacti/site/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Access denied for user 'cacti'@'localhost' (using password: YES) in /usr/share/cacti/site/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Access denied for user 'cacti'@'localhost' (using password: YES) in /usr/share/cacti/site/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Access denied for user 'cacti'@'localhost' (using password: YES) in /usr/share/cacti/site/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Access denied for user 'cacti'@'localhost' (using password: YES) in /usr/share/cacti/site/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Access denied for user 'cacti'@'localhost' (using password: YES) in /usr/share/cacti/site/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Access denied for user 'cacti'@'localhost' (using password: YES) in /usr/share/cacti/site/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Access denied for user 'cacti'@'localhost' (using password: YES) in /usr/share/cacti/site/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Access denied for user 'cacti'@'localhost' (using password: YES) in /usr/share/cacti/site/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Access denied for user 'cacti'@'localhost' (using password: YES) in /usr/share/cacti/site/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Access denied for user 'cacti'@'localhost' (using password: YES) in /usr/share/cacti/site/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Access denied for user 'cacti'@'localhost' (using password: YES) in /usr/share/cacti/site/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Access denied for user 'cacti'@'localhost' (using password: YES) in /usr/share/cacti/site/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Access denied for user 'cacti'@'localhost' (using password: YES) in /usr/share/cacti/site/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Access denied for user 'cacti'@'localhost' (using password: YES) in /usr/share/cacti/site/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Access denied for user 'cacti'@'localhost' (using password: YES) in /usr/share/cacti/site/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Access denied for user 'cacti'@'localhost' (using password: YES) in /usr/share/cacti/site/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Access denied for user 'cacti'@'localhost' (using password: YES) in /usr/share/cacti/site/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Access denied for user 'cacti'@'localhost' (using password: YES) in /usr/share/cacti/site/lib/adodb/drivers/adodb-mysql.inc.php on line 339

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

Best regards
Back to top
pirx
Cacti User


Joined: 10 Feb 2004
Posts: 165
Location: Sindelfingen, Germany

PostPosted: Mon Oct 10, 2005 4:19 am    Post subject: Reply with quote

Hi,

you need to customize your cacti install and put the user/pass in /usr/share/cacti/site/include/config.php

For example:

$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cacti";
$database_password = "cacti";


Ralf
Back to top
gg234
Cacti User


Joined: 07 Oct 2005
Posts: 62

PostPosted: Mon Oct 10, 2005 8:34 am    Post subject: Reply with quote

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

/* ----- you probably do not need to change anything below this line ----- */

/* Files that do not need http header information - Command line scripts */
$no_http_header_files = array(
"poller.php",
"cmd.php",
"query_host_cpu.php",
"query_host_partitions.php",
"sql.php",
"ss_host_cpu.php",
"ss_host_disk.php",
"ss_sql.php"
);

$colors = array();
$config = array();

/* this should be auto-detected, set it manually if needed */
$config["cacti_server_os"] = (strstr(PHP_OS, "WIN")) ? "win32" : "unix";

/* built-in snmp support */
$config["php_snmp_support"] = function_exists("snmpget");

/* used for includes */
$config["base_path"] = ereg_replace("(.*)[\/\\]include", "\\1", dirname(__FILE__));
$config["library_path"] = ereg_replace("(.*[\/\\])include", "\\1lib", dirname(__FILE__));
$config["include_path"] = dirname(__FILE__);

/* colors */
$colors["dark_outline"] = "454E53";
$colors["dark_bar"] = "AEB4B7";
$colors["panel"] = "E5E5E5";
$colors["panel_text"] = "000000";
$colors["panel_link"] = "000000";
$colors["light"] = "F5F5F5";
$colors["alternate"] = "E7E9F2";
$colors["panel_dark"] = "C5C5C5";

$colors["header"] = "00438C";
$colors["header_panel"] = "6d88ad";
$colors["header_text"] = "ffffff";
$colors["form_background_dark"] = "E1E1E1";

$colors["form_alternate1"] = "F5F5F5";
$colors["form_alternate2"] = "E5E5E5";

if ((!in_array(basename($_SERVER["PHP_SELF"]), $no_http_header_files, true)) && ($_SERVER["PHP_SELF"] != "")) {
/* we don't want these pages cached */
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
/* we don't want these pages cached */
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");

/* initilize php session */
session_start();

/* detect and handle get_magic_quotes */
if (!get_magic_quotes_gpc()) {
function addslashes_deep($value) {
$value = is_array($value) ? array_map('addslashes_deep', $value) : addslashes($value);
return $value;
}

$_POST = array_map('addslashes_deep', $_POST);
$_GET = array_map('addslashes_deep', $_GET);
$_COOKIE = array_map('addslashes_deep', $_COOKIE);
}

/* make sure to start only only Cacti session at a time */
if (!isset($_SESSION["cacti_cwd"])) {
$_SESSION["cacti_cwd"] = $config["base_path"];
}else{
if ($_SESSION["cacti_cwd"] != $config["base_path"]) {
session_unset();
session_destroy();
}
}
}

/* emulate 'register_globals' = 'off' if turned on */
if ((bool)ini_get("register_globals")) {
$not_unset = array("_GET", "_POST", "_COOKIE", "_SERVER", "_SESSION", "_ENV", "_FILES", "database_type", "database_default", "database_hostname", "database_username", "database_password", "config", "colors");

/* Not only will array_merge give a warning if a parameter is not an array, it will
* actually fail. So we check if HTTP_SESSION_VARS has been initialised. */
if (!isset($_SESSION)) {
$_SESSION = array();
}

/* Merge all into one extremely huge array; unset this later */
$input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_SESSION, $_ENV, $_FILES);

unset($input["input"]);
unset($input["not_unset"]);

while (list($var,) = @each($input)) {
if (!in_array($var, $not_unset)) {
unset($$var);
}
}

unset($input);
}

/* display ALL errors */

error_reporting(E_ALL);

/* include base modules */
include($config["library_path"] . "/adodb/adodb.inc.php");
include($config["library_path"] . "/database.php");
include_once($config["library_path"] . "/functions.php");
include_once($config["include_path"] . "/config_constants.php");
include_once($config["include_path"] . "/config_arrays.php");
include_once($config["include_path"] . "/config_settings.php");

/* connect to the database server */
db_connect_real($database_hostname, $database_username, $database_password, $database_default, $database_type);

/* include additional modules */
include_once($config["include_path"] . "/config_form.php");
include_once($config["library_path"] . "/html.php");
include_once($config["library_path"] . "/html_form.php");
include_once($config["library_path"] . "/html_utility.php");
include_once($config["library_path"] . "/html_validate.php");
include_once($config["library_path"] . "/variables.php");
include_once($config["library_path"] . "/auth.php");

/* current cacti version */
$config["cacti_version"] = "0.8.6c";

?>



this is the file you menctioned where i need to add those details.You can see those bold letters under this or some whre else thanks for your help
Back to top
StaWha



Joined: 26 Jul 2005
Posts: 36

PostPosted: Mon Oct 10, 2005 8:48 am    Post subject: Reply with quote

It seems that with the debian package the file to customize
is '/etc/cacti/debian.php' .
Back to top
mav21



Joined: 21 Oct 2005
Posts: 3
Location: Houston

PostPosted: Fri Oct 21, 2005 9:53 pm    Post subject: Cacti graphs don't show Reply with quote

This seems to go here.

I got past the sql errors and it seems the rrdtool is trying to do its job. However i waited over an hour and got no graphed information. Is there something that I am still missing?

Here is one of the graph configuration files;

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Localhost - Memory Usage" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="kilobytes" \
DEF:a="/usr/share/cacti/site/rra/localhost_mem_buffers_3.rrd":mem_buffers:AVERAGE \
DEF:b="/usr/share/cacti/site/rra/localhost_mem_swap_4.rrd":mem_swap:AVERAGE \
AREA:a#FF4105:"Free" \
GPRINT:a:LAST:"Current\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n" \
STACK:b#FFC73B:"Swap" \
GPRINT:b:LAST:"Current\:%8.2lf %s" \
GPRINT:b:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:b:MAX:"Maximum\:%8.2lf %s"

Any help would be appreciated

Thanks Chris
Back to top
iNeo



Joined: 03 Nov 2005
Posts: 3

PostPosted: Thu Nov 03, 2005 7:35 am    Post subject: Reply with quote

Hi,

I am also trying to get Cacti running on a Debian testing system.

But every seems to be working but there are no graphs

It is no directory security issue because rra/ has for 775 for root and www-data and
de cron entry runs with the owner www-data for the cacti poller.php.
But there are also no .rrd file in the rra/ directory.

Somebody any idea :?:

iNeo
Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12295
Location: Muenster, Germany

PostPosted: Sat Nov 05, 2005 2:59 pm    Post subject: Reply with quote

iNeo wrote:
Hi,

I am also trying to get Cacti running on a Debian testing system.

But every seems to be working but there are no graphs

It is no directory security issue because rra/ has for 775 for root and www-data and
de cron entry runs with the owner www-data for the cacti poller.php.
But there are also no .rrd file in the rra/ directory.

Somebody any idea :?:

iNeo
su to your cacti user (www-data in this case) and run the poller manually. You'll probably get some error messages that may help.
Reinhard
Back to top
soneedu



Joined: 20 Nov 2005
Posts: 9

PostPosted: Sun Nov 20, 2005 10:55 pm    Post subject: Reply with quote

i meet the same problem too. why???
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9697
Location: MI, USA

PostPosted: Mon Nov 21, 2005 5:53 am    Post subject: Reply with quote

Easiest way to solve this one is to log into console using your poller's cron ID and run "php poller.php" from the <path_cacti> directory. You will see STDOUT in your face. Otherwise, redirect STDOUT and STDERR to a file from CRON and look at that file. You will have enlightenment.

TheWitness
Back to top
griswold



Joined: 20 Jun 2006
Posts: 2

PostPosted: Tue Jun 20, 2006 1:38 pm    Post subject: Reply with quote

Hi,

I just finished an install on a fresh sarge.
Cacti works : I get the 4 default graphs without any problem.

My problem is that I can't use SNMP to monitor my network adapter (or is there another way to do it ?).
On the 'about' page, I get 'PHP SNMP Support: no" despite I installed snmpd and php4-snmp packages.

Any idea ?
Back to top
JJX
Cacti User


Joined: 06 Oct 2005
Posts: 171

PostPosted: Tue Jun 20, 2006 3:52 pm    Post subject: Reply with quote

did u edit snmpd.conf ?
Back to top
griswold



Joined: 20 Jun 2006
Posts: 2

PostPosted: Wed Jun 21, 2006 11:54 am    Post subject: Reply with quote

No it is the default one.
Back to top
iampuero



Joined: 05 Sep 2006
Posts: 4

PostPosted: Tue Sep 05, 2006 9:50 am    Post subject: CACTI Passwd Reply with quote

First. sorry my english, im chilean...

I install CACTI, i follow yours instruction, but when i connect to http://localhost/cacti , i put my username = cacti and my password = cacti, but say Invalid User Name/Password

Why ????

some can help me???
Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12295
Location: Muenster, Germany

PostPosted: Wed Sep 06, 2006 11:55 am    Post subject: Reply with quote

For first login, use admin/admin. You may change this using "User Admin"
Reinhard
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Help: Linux/Unix Specific All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 



Powered by phpBB © 2001, 2005 phpBB Group