General Discussion

Ubuntu Server / Desktop Monitoring With Cacti

Ubuntu Servers

What is Cacti?
It is a solution based on network graphs and was mainly aimed at developing the strength of RRD TOOL Data Storage and its function. It polls fast, and also has an advanced graph template, it can acquire multiple data at the same time and many other user management features. Its interface is very easy to use and helps in the LAN installations upgrade up to various Complex networks with different devices.

The following is the installation Cacti from the source code –

a) Preparation of Server –

> Apache Web Server Installation along with PHP support in Ubuntu Server.
> sudo apt-get install apache2 apache2-common apache2-mpm-prefork apache2-utils
sudo apt-get install libapache2-mod-php4 php4-cli php4-common php4-cgi

> In the case of installation of PHP5 support, make a use of the following Command –

sudo apt-get install libapache2-mod-php5 php5-cli php5-common php5-cgi

This will install Apache2 webserver

b) MySQL Installation with PHP support –

sudo apt-get install mysql-server mysql-client libmysqlclient12-dev
sudo apt-get install php4-mysql

c) In this case you could also install php5 support, by using the following –

sudo apt-get install php5-MySQL

d) To check with other dependancies Installation, please make follow the commands mentioned below –

sudo apt-get install make gcc g++
sudo apt-get install cgilib freetype2 libttf-dev libttf2 libpngwriter0-dev libpng3-dev libfreetype6-dev libart-2.0-dev snmp

e) Installation RRD Tool from Source –

There is a requirement for the download of the latest RRD tool –

sudo cd /usr/local/src/
sudo wget
sudo tar xfvz rrdtool-1.2.15.tar.gz
sudo cd rrdtool-1.2.15
sudo ./configure
sudo make
sudo make install

RRD Tool installation Complete

f) Installation of Cacti from Source –

Download the Latest Version from to the Apache Web Server document root.

However the default is /var/www/, the download can be completed if the root path is changed.

sudo cd /var/www/
sudo wget

g) Extraction of Tarball distribution –

sudo tar xzvf cacti-0.8.6i.tar.gz

h) Move to Cacti Directory –

sudo mv cacti-0.8.6i cacti

i) In order to check for the correct permission granted in Cacti files –

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

j) In order to import Cacti default database –

sudo mysql cacti < cacti.sql

k) Creation of MySQL Username and Password for Cacti

sudo mysql –user=root mysql

mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY ’password entered here’;

mysql> flush privileges;

mysql> exit