1. Download the latest version of cacti from the dag repository.

# wget http://packages.sw.be/cacti/cacti-0.8.7g-2.el5.rf.noarch.rpm

2. install cacti

# rpm -Uvh cacti-0.8.7g-2.el5.rf.noarch.rpm(this will restart the apache process)

3. Create the MySQL database:

# mysql
mysql> create database cactidb
mysql> GRANT ALL ON cactidb.* TO cactiadmin@localhost IDENTIFIED BY ‘$PASSWORD’;
mysql> flush privileges;

4. Import the default cacti database:

# mysql cactidb < /var/www/cacti/cacti.sql

5. Edit include/config.php and specify the database type, name, host, user and password for your Cacti configuration.

# vi /var/www/cacti/include/config.php
$database_type = “mysql”;$database_default = “cactidb”;$database_hostname = “localhost”;$database_username = “cactiadmin”;$database_password = “$PASSWORD”;$database_port = “3306″;

6. 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 cacti /var/www/cacti/rra/ /var/www/cacti/log

7. Update snmpd.conf to allow cacti to pull info and restart snmpd

# vi /etc/snmp/snmpd.conf
view    systemview    included   .    systemview    included   .    systemview    included   .1
#/etc/init.d/snmpd restart

8. Update cacti vhost to allow IP addresses and reload apache.

# vi /etc/httpd/conf.d/cacti.conf

Allow from $YOUR_IP

# /etc/init.d/httpd reload

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

# crontab -e
*/5 * * * * cacti php /var/www/cacti/poller.php > /dev/null 2>&1

10. Finish the configuration

Default pageclick next
Ensure “new install” is selected.click next
All the defaults should be green. If there are a bunch of read, ensure that it is looking in the right place for the files.Click Next
Login with admin admin and set the password to ‘$PASSWORD’

Leave a Reply