Install Cacti on CentOS 5

From CSLabsWiki
Revision as of 01:12, 21 April 2010 by Mccarrms (talk | contribs) (saving to avoid losing curent status)

This page summarizes how to perform a basic installation of Cacti on CentOS 5.


Add RPMForge Yum Repository

Install & Configure Prerequisites

  • Install Apache
    • yum install httpd
  • Configure Apache to start on boot
    • /sbin/chkconfig --levels 345 httpd on
  • Configure iptables to allow Apache traffic
    • /sbin/iptables -A INPUT -p tcp --dport 80 -j ACCEPT
    • /etc/init.d/iptables save
    • /etc/init.d/iptables restart

Install & Configure Cacti

  • Install Cacti & Required Dependencies
    • yum install cacti mysql-server liberation-fonts

Configure MySQL

  • Configure mysqld to start on boot
    • /sbin/chkconfig --levels 345 mysqld on
  • Start mysqld
    • /etc/init.d/mysqld start
  • Set the password for the MySQL root user
    • /usr/bin/mysqladmin -u root password 'PASSWORD-GOES-HERE'
  • Create the MySQL cacti database (Note: The password you will be prompted for is the one you just set.)
    • /usr/bin/mysqladmin -u root -p create cacti
  • Log into the MySQL database and grant the cactiuser access to the cacti database
    • /usr/bin/mysql -u root -p
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 46
Server version: 5.0.77 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> GRANT ALL ON cacti.* TO 'cactiuser'@'localhost' IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.00 sec)

mysql> quit
  • Start Apache
    • /etc/init.d/httpd start

Verify Install

  • Try logging into your new Cacti installation by going to http://servername/cacti/ and logging in with admin and the password you set.