Cacti Install: Difference between revisions

From KlavoWiki
Jump to navigationJump to search
No edit summary
Line 25: Line 25:
Download and install Cacti
Download and install Cacti
<pre>
<pre>
wget http://www.cacti.net/downloads/cacti-0.8.7e.tar.gz
wget http://www.cacti.net/downloads/cacti-0.8.8a.tar.gz
tar xzvf cacti-0.8.7e.tar.gz
tar xzvf cacti-0.8.8a.tar.gz
rm -f cacti-0.8.7e.tar.gz
rm -f cacti-0.8.8a.tar.gz


mv cacti-0.8.7e /var/www/html/cacti
mv cacti-0.8.8a /var/www/html/cacti
</pre>
</pre>



Revision as of 03:50, 6 December 2012

Prerequisites

First of all download install the pre requisite rrdtool.

cd /usr/src
wget http://dag.wieers.com/rpm/packages/rrdtool/rrdtool-1.0.50-3.el5.rf.i386.rpm
rpm -i rrdtool-1.0.50-3.el5.rf.i386.rpm

Install further Linux required applications.

yum -y install httpd php php-mysql php-snmp mysql mysql-server net-snmp net-snmp-utils

Start and set to auto start on boot.

chkconfig mysqld on
chkconfig httpd on

service mysqld start
service httpd start


Cacti

Download and install Cacti

wget http://www.cacti.net/downloads/cacti-0.8.8a.tar.gz
tar xzvf cacti-0.8.8a.tar.gz
rm -f cacti-0.8.8a.tar.gz

mv cacti-0.8.8a /var/www/html/cacti

Configure mysql

cd /var/www/html/cacti
mysqladmin --user=root create cacti
mysql cacti < cacti.sql

mysql
use cacti


GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'password';
flush privileges;
quit


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

$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "somepassword";


Accessing Cacti

From a web browser type in your servers IP address

http://ipaddress/cacti

Username and Passwrod for Cacti

The default username and password is admin

username admin
password admin

cron job

Add the following line to cron

*/5 * * * * /usr/bin/php /var/www/html/cacti/poller.php > /dev/null 2>&1

snmp client

Install SNMP client tools for linux.

yum install net-snmp net-snmp-utils

chkconfig snmpd on
service snmpd start