TOTAL
Since dec 2006
1'942'871 Visitors
4'218'042 Pages

Nov 2010 Stats
82'909 Visitors
146'476 Pages
196 countries
Full statistics



Help us translate
our tutorials!

JOIN the
OpenManiak Team.
OM TEAM
Director:
Blaise Carrera
Tutorials creation:
Blaise Carrera
Translaters:
Giovanni Fredducci
Angel Chraniotis
Moham. H. Karvan
Alexandro Silva
Blaise Carrera
Andrei Chertolyas
Sergiy Uvarov
Nickola Kolev
Łukasz Nowatkowski
Ivo Raisr
Catalin Bivolaru
Bogdan A. Costea
Kirill Simonov
Oliver Mucafir
JaeYoung Jeon
Seungyoon Lee
Jie Yu & Si Cheng
Tao Wei
YukiAlex
Fumihito Yoshida
Muhammad Takdir
Çağdaş Tülek
Auditors
Leslie Luthi
Joe Anderson
Jennifer Ockwell
Nigel Titley
Alison Rees
Webmaster:
Blaise Carrera
CACTI - The Easy Tutorial - Installation

Cacti Installation
Last Change : Mar 13 2008


Tool
Install
Ergonomy
Forum



Details What is Cacti?
Screenshots
Prerequisites
Installation
Plugins
SNMP clients



⚠️⚠️⚠️
Please check our website about
attractions in Western Switzerland !! (Please use english translation).

⚠️⚠️⚠️
Merci de consulter notre site sur les
activités à faire en Suisse romande !!



We have to install the Cacti program which is in fact a php script.
You can either download the files and configure them ("manual install") or just apt-get Cacti.

1. PACKAGE INSTALL 2. MANUAL INSTALL


1- 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.

cacti package install ubuntu debian MySql root user password MySql root user password
cacti package install ubuntu debian New MySql cacti user password New MySql cacti user password
cacti package install ubuntu debian	Confirm MySql cacti user password Confirm MySql cacti user password
cacti package install ubuntu debian	Web server used by cacti Web server used by cacti
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.

cacti installation guide 	Cacti license Cacti license
cacti installation guide 		Select upgrade or new install Select "upgrade" or "new install"
cacti installation guide 	Check if the required tools are correcty seen by cacti Check if the required tools are correcty seen by cacti
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.

Top of the page



2- MANUAL INSTALL OF CACTI

Download Catci at http://www.cacti.net
uncompress the tar.gz file

#tar -xvf cacti-0.8.6h.tar.gz
move the uncompressed folder inside your /var/www folder, for example:

#mv /home/po/Desktop/cacti /var/www/
Then Configure the Cacti database

#mysqladmin -u root -p create cacti
We now have to insert the Cacti tables inside the cacti database:

mysql -u root -p cacti < /var/www/cacti/sql/cacti.sql
As always, it's better to access the database without the root user.
So, login into the database and create a new MySQL user:

#mysql -u root -p cacti
We give all the rights to the cactiuser on the cacti database:

mysql> grant all on cacti.* to cactiuser@localhost identified by 'cactiuser';
Now, reload mysql rights:

mysql>flush privileges;
mysql>exit
We need to change the database connection settings located in the
/var/www/cacti/include/config.php file

$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cactiuser";
$database_port = "3306";
We then need to create a user to run cacti, this user will not be allowed tu run any shell command (/bin/false):

#useradd cacti -d /var/www/cacti/ -s /bin/false

The cacti user we need to write in two folders, so:

#chown -R cacti /var/www/cacti/
We will need to do a cron job to run the php script every 5 minutes

#crontab -e -u cacti
*/5 * * * * php5 /var/www/cacti/poller.php > /dev/null 2>&1
Restart the apache webserver:

#/etc/init.d/apache2 restart
Finally we can log in to cacti with a web browser:

http://your_ip_address/cacti
Use "admin" as the default login and password.
See the browser screenshots.

Top of the page