A Newer version of this document is available at-
The following programs are needed to run cacti:
– apache2 for the web server
– mysql-server for the database
– php5 for the server-based script
– snmp – snmp tools used to collect data to the remote hosts
– rrdtool – a perl script to format collected data to rrdtool files
php5-gd – the graphical library used by a Cacti plugin named php weathermap
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
|#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.
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:
If you want to activate the poller manually:
Sometime you need to activate it the first time, then it runs automatically every 5 minutes by default.
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
Then run the command below:
Just be CAREFUL to run the patch matching your cacti version.
#patch -p1 -N < cacti-plugin-0.8.6h.diff
#patch -p1 -N < cacti-plugin-0.8.6i.diff
#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)