Ubuntu Server / Desktop Monitoring With Cacti

January 25, 2007 / General Discussion

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 –

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

    > For PHP5 support installation. Use the following command

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

    This will install Apache2 webserver

  2. MySQL Installation with PHP support –
    sudo apt-get install mysql-server mysql-client libmysqlclient12-dev
    sudo apt-get install php4-mysql
  3. In this case you could also install php5 support, by using the following –
    sudo apt-get install php5-MySQL
  4. 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
  5. Installation RRD Tool from Source –

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

    sudo cd /usr/local/src/
    sudo wget http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/rrdtool-1.2.15.tar.gz
    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

  6. Installation of Cacti from Source –

    Download the Latest Version from http://www.cacti.net/download_cacti.php to the Apache Web Server document root.

    The default is /var/www/; the download can be completed if the root path is changed.

    sudo cd /var/www/
    sudo wget http://www.cacti.net/downloads/cacti-0.8.6i.tar.gz

  7. Extraction of Tarball distribution –
    sudo tar xzvf cacti-0.8.6i.tar.gz
  8. Move to Cacti Directory –
    sudo mv cacti-0.8.6i cacti
  9. To check for the correct permissions granted in Cacti files,
    sudo chown -R www-data:www-data rra/ log/
  10. In order to import Cacti default database –
    sudo mysql cacti < cacti.sql
  11. 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