Posted on Friday, 22nd January 2010 by Balazs
Introduction
Cacti is a great tool to graph performance of the various hardware components of a network. With the use of the yum repository manager, it is very simple to install on Red Hat Enterprise Linux 5 or CentOS 5.
Install steps
- First make sure that you have the
dagrepository configured inyum. Edit or create the file/etc/yum.repos.d/dag.repo:
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=0
enabled=1
protect=0 - Now install the required packages:
sudo yum install net-snmp mysql mysql-server cacti - Edit the /etc/httpd/conf.d/cacti.conf file to allow access to cacti as needed.
- Make sure Apache and MySQL are started and set to start automatically:
sudo service mysqld start
sudo service httpd start
sudo chkconfig –level 345 mysqld on
sudo chkconfig –level 345 httpd on - Set up the cacti database in MySQL:
sudo mysqladmin –user=root create cacti
cd /var/www/cacti
sudo mysql cacti < cacti.sql
sudo mysql --user=root mysql
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY ‘cactiuser’;
mysql> SET PASSWORD FOR cactiuser = PASSWORD('my_super_secret_cacti_password');
mysql> flush privileges;
mysql> exit
sudo mysqladmin –user=root password "my_super_secret_root_password" - Setup the cacti poll schedule in /etc/crontab:
*/5 * * * * cacti php /var/www/cacti/poller.php > /dev/null 2>&1 - Run the cacti installer in the browser:
provide the user and password for the database, you can accept all defaults and just click next
http://your.server.com/cacti/index.php - That is it, you are good to go.
References
Installing Cacti on CentOS with yum
Tags: Cacti, CentOS, RHEL 5
Posted in Linux | Comments (Comments)