Cacti Installation And Configuration From Cacti Source code

If you want to know the basics of cacti check here

Cacti Installation From Source

First You need to install all the required compilers

#apt-get install make gcc g++

#apt-get install cgilib freetype2 libttf-dev libttf2 libpngwriter0-dev libpng3-dev libfreetype6-dev libart-2.0-dev

Install rrdtool from Source

Now you need to download latest rddtool

#cd /usr/local/src/


#tar xfvz rrdtool-1.2.15.tar.gz

#cd rrdtool-1.2.15



#make install

Now you need to install apache and mysql servers

#apt-get install apache2

#apt-get install mysql-server-4.1

#apt-get install libapache2-mod-php4 php4 php4-cli php4-common php4-mysql php4-snmp php4-pear

Now you need to download the latest cacti from the following link

Extract the distribution tarball.

#tar xzvf cacti-version.tar.gz

Create the MySQL database

#mysqladmin --user=root create cacti

Import the default cacti database

# mysql cacti < cacti.sql

Optional: Create a MySQL username and password for Cacti.

#mysql --user=root mysql

mysql> GRANT ALL ON cacti.* TO [email protected] IDENTIFIED BY 'somepassword';

mysql> flush privileges;

Edit include/config.php and specify the MySQL user, password and database for your Cacti configuration.

$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cacti";

Set the appropriate permissions on cacti's directories for graph/log generation. You should execute these commands from inside cacti's directory to change the permissions.

#chown -R www-data:www-data rra/ log/

(Enter a valid username for cactiuser, this user will also be used in the next step for data gathering.)

Add a line to your /etc/crontab file similar to:

*/5 * * * * cactiuser php /var/www/cacti/poller.php > /dev/null 2>&1

Replace cactiuser with the valid user specified in the previous step.

Replace /var/www/cacti/ with your full Cacti path.

Point your web browser to:


This will give you some basic questions to answer just click next and when it gives you all the installation paths on this screen if you found below error

[NOT FOUND] RRDTool Binary Path: The path to the rrdtool binary.

You need to change the directory to - /usr/local/rrdtool-1.2.15/bin/rrdtool

Log in the with a username/password of admin. You will be required to change this password immediately. Make sure to fill in all of the path variables carefully and correctly on the following screen