Site icon Technical Blog | REBELADMIN

How to install Cacti on Linux

Cacti is a complete network graphing solution designed to harness the power of RRDTool's data storage and graphing functionality. Cacti provides a fast poller, advanced graph templating, multiple data acquisition methods, and user management features out of the box. All of this is wrapped in an intuitive, easy to use interface that makes sense for LAN-sized installations up to complex networks with hundreds of devices. For More information http://www.cacti.net/what_is_cacti.php

# yum install mysql-server mysql php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-snmp php-pear-Net-SMTP php-mysql httpd

# mysqladmin -u root password NEWPASSWORD

# mysql -u root -p -e 'create database cacti'

# mysql -u root –p mysql> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY '123456'; mysql> FLUSH privileges; mysql> \q

yum install net-snmp-utils php-snmp net-snmp-libs

# mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.org vi /etc/snmp/snmpd.conf add line rocommunity  public and save the file. ( wq!)

# /etc/init.d/snmpd start # chkconfig snmpd on

# rpm –Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm # yum install cacti

# rpm -ql cacti | grep cacti.sql # mysql -u cacti -p cacti < /usr/share/doc/cacti-0.8.7d/cacti.sql

# vi /etc/cacti/db.php

$database_type = "mysql"; $database_default = "cacti"; $database_hostname = "localhost"; $database_username = "cacti"; $database_password = "123456"; $database_port = "3306";

# vi /etc/httpd/conf.d/cacti.conf # # Cacti: An rrd based graphing tool # Alias /cacti    /usr/share/cacti <Directory /usr/share/cacti/> Order Deny,Allow Allow from all </Directory>

# service httpd restart

# vi /etc/cron.d/cacti

*/5 * * * *     cacti   /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1

http://your.example.com/cacti/ please follow the instruction to complete the installation. after that you can go in add the devices you like to monitor. this is very usefully when you need to monitor bandwidth on switch etc. Hope this help you guys. if there is any question feel free to contact me on rebeladm@live.com