Saturday 14 December 2013

Install Cacti-0.8.8b on Ubuntu 12.04




It`s really difficult to find any single and straight document on installation of Cacti-0.8.8b on Ubuntu 12.04,  which includes "plugin management" in built. So below post is created will help in installing Cacti with plugin management

Step 1
Upgrade and install Cacti dependent applications
#apt-get update
#apt-get install elinks
#apt-get install python-software-properties
#apt-get install snmpd snmp mysql-server apache2 libapache2-mod-php5 php5-mysql php5-cli php5-snmp
If you have not set up MySQL, you will be prompted for a root user password. Make your selection and confirm the password to continue.


Step 2
Add repository to install latest version of Cacti ( i.e. Cacti-0.8.8b)
#add-apt-repository ppa:paul-climbing/cacti
Edit below lines from newly added repository
#vim /etc/apt/sources.list.d/paul-climbing-cacti-precise.list
change word “precise” to “quantal” in both line.As cacti does not need to change between most Ubuntu releases
deb http://ppa.launchpad.net/paul-climbing/cacti/ubuntu precise main
deb-src http://ppa.launchpad.net/paul-climbing/cacti/ubuntu precise main
to
deb http://ppa.launchpad.net/paul-climbing/cacti/ubuntu quantal main
deb-src http://ppa.launchpad.net/paul-climbing/cacti/ubuntu quantal main


Step 3
Update repository and install cacti
#apt-get update
#apt-get install cacti
Next, press “Return” or “Enter” to acknowledge a configuration change in php.


The initial configuration of Cacti also happens during installation. There are a few questions you need to answer. Select “Apache2” from the list of webservers.
After Cacti configures apache, the installation sets up a MySQL account for the application. Select “Yes” to allow a generic database configuration.

Provide the password for the administration of the Cacti database that you set up during the MySQL configuration.

Next, it asks for a password for Cacti to use with the database. This is an internal password that you should not ever have to use, so it is okay if you just press “Enter” to create a random password.
As installation completes one apache error will be seen. To overcome this error take backup of /etc/apache2/conf.d/cacti.conf and replace with below configuration
_____________________________________________________________________________
Alias /cacti /usr/share/cacti/site


<Directory /usr/share/cacti/site>
Options +FollowSymLinks
AllowOverride None
order allow,deny
allow from all


AddType application/x-httpd-php .php


<IfModule mod_php5.c>
php_flag magic_quotes_gpc Off
php_flag short_open_tag On
php_flag register_globals Off
php_flag register_argc_argv On
php_flag track_vars On
# this setting is necessary for some locales
php_value mbstring.func_overload 0
php_value include_path .
</IfModule>
DirectoryIndex index.php
</Directory>


Restart Apache
#/etc/init.d/apache2 restart
Install Cacti-spine
#apt-get install cacti-spine
Step 4
Make Below changes in SNMP
#vim /etc/snmp/snmpd.conf
Open the file and find the section labeled Agent Behaviour. Comment out the line that specifies 127.0.0.1 as the agent address by placing a # in front of it. Uncomment the other line that defines the agentAddress as all interfaces.Also uncomment rocommunity and place address of your network. The Agent Behavior section should now resmble the following:


# Listen for connections from the local system only
#agentAddress udp:127.0.0.1:161
# Listen for connections on all interfaces (both IPv4 *and* IPv6)
agentAddress udp:161,udp6:[::1]:161
rocommunity secret 172.16.0.0/24
Restart SNMPD
#/etc/init.d/snmpd restart

Step 5
Configure Cacti with web interface.
The rest of the configuration will be done through a web browser. Open your web browser and navigate to your server ip address or domain name with “/cacti” on the end.
http://<server-ip>/cacti
The first page you will see is an introduction to the Cacti software. Click “Next >>” when you are finished reading. Click "Next >>" again on the following page since this is a new installation.

The next page shows the application paths of the “helper” applications that Cacti
uses to operate. All of the applications should be green and marked with “[FOUND]”. Click “Finish” to continue.

Next, you’ll be asked to enter the Cacti user name and password. These are not the passwords you entered during installation. Instead, enter the following default values.
Username : admin
password : admin
You’ll be prompted to enter a new password for administrating Cacti. Choose a password and click “Save”.

You are now on your Cacti page.

Version will be 0.8.8b ( On left hand upper side corner)
In configuration you could see Plugin Management




Short summary of steps
Update/Upgrade repository and Ubuntu packages
apt-get update
apt-get upgreade
Install Dependency applications
apt-get install elinks
apt-get install python-software-properties
apt-get install snmpd snmp mysql-server apache2 libapache2-mod-php5 php5-mysql php5-cli php5-snmp
Install private repository to install Cacti
add-apt-repository ppa:paul-climbing/cacti
vim paul-climbing-cacti-precise.list
apt-get update
apt-get install cacti
Correct Apache settings and restart apache
cp /etc/apache2/conf.d/cacti.conf /root/
echo > /etc/apache2/conf.d/cacti.conf
vim /etc/apache2/conf.d/cacti.conf (Edit file as mentioned above)
/etc/init.d/apache2 restart
Install cacti-spine
apt-get install cacti-spine
Configure SNMP
vim /etc/snmp/snmpd.conf  ( Edit file as mentioned above )
/etc/init.d/snmpd restart
Configure Cacti first-time confiuration with Web-UI

No comments:

Post a Comment