Cacti: How ton install on a Debian server

=======================================

A Newer version of this document is available at-

https://tweenpath.net/?p=1705

=======================================

The following programs are needed to run cacti:

– apache2 for the web server
– mysql-server for the database
– php5 for the server-based script
– php5-common
– php5-cgi
– php5-cli
– php5-mysql
– snmp – snmp tools used to collect data to the remote hosts
– rrdtool – a perl script to format collected data to rrdtool files

facultative:

php5-gd – the graphical library used by a Cacti plugin named php weathermap

INSTALL PROGRAMS

Use apt-get to install the programs

#apt-get install apache2
#apt-get install mysql-server
#apt-get install php5
#apt-get install php5-common
#apt-get install php5-cgi
#apt-get install php5-cli
#apt-get install php5-mysql
#apt-get install snmp
#apt-get install rrdtool

INSTALL CACTI WITH APT-GET (recommanded)

#apt-get install cacti

You will have to configure the mysql settings through a little wizard.
At the end of the tutorial, a mysql database and user named cacti will be automatically created.

Now Cacti is ready to be used via: http://localhost/cacti
The default login and password are admin.
Cacti will check if all the required tools are correctly installed.

Note that the poller.php script which send the requests to the remote hosts is lauched by the apache2 user, it means www-data.

To reconfigure cacti, use the following command:

#dpkg-reconfigure cacti
If you want to activate the poller manually:

#/usr/share/cacti/site/php5 poller.php
Sometime you need to activate it the first time, then it runs automatically every 5 minutes by default.

Plugin

A big strength of Cacti is its possibility to use other tools into plugins in its web interface. The plugins will be useful if you want to group some network related softwares into one interface.
On the cactiusers.org website, you can find and download all the available plugins. We chose here the tutorials about three very useful plugins: NTOP, syslog-ng and PHP Weathermap.

The first thing to do is to install a mandatory plugin, which is required before installing the other one, it is called the “architecture” plugin.

– For Cacti 0.8.6i & j, it can be downloaded (1.1) on the cactiusers.org website.
– For Cacti 0.8.6h, it can be downloaded (1.0) on our website.

If you install cacti with apt (packaged install), you can know your cacti version with the “apt-cache policy cacti” command.

Uncompress the file you just downloaded.

#tar -xvf /home/user/Desktop/cacti-plugin-arch.tar.gz
Move the files inside the architecture plugin directory you just downloaded into the directory containing the cacti website.

#cp /home/user/Desktop/cacti-plugin-arch/* /usr/share/cacti/site/ -R
#cd /usr/share/cacti/site/
Then run the command below:
Just be CAREFUL to run the patch matching your cacti version.

For cacti-0.8.6h:

#patch -p1 -N < cacti-plugin-0.8.6h.diff
For cacti-0.8.6i:

#patch -p1 -N < cacti-plugin-0.8.6i.diff
For cacti-0.8.6j:

#patch -p1 -N < cacti-plugin-0.8.6j.diff

THE CACTI PLUGINS:

1. NTOP (v 0.1)         2. PHP WEATHERMAP (v 0.82)         3. SYSLOG-NG (v 0.4)

Src: http://openmaniak.com/cacti_plugins.php

Share

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.