Difference between revisions of "Install Cacti on CentOS 5"

From CSLabsWiki
m (Install & Configure Prerequisites)
(saving to avoid losing curent status)
Line 33: Line 33:
 
===Install & Configure Cacti===
 
===Install & Configure Cacti===
   
*Install Cacti
+
*Install Cacti & Required Dependencies
**<code>yum install </code>
+
**<code>yum install cacti mysql-server liberation-fonts</code>
   
  +
====Configure MySQL====
  +
*Configure <code>mysqld</code> to start on boot
  +
**<code>/sbin/chkconfig --levels 345 mysqld on</code>
   
  +
*Start <code>mysqld</code>
  +
**<code>/etc/init.d/mysqld start</code>
  +
  +
*Set the password for the MySQL root user
  +
**<code>/usr/bin/mysqladmin -u root password 'PASSWORD-GOES-HERE'</code>
  +
  +
*Create the MySQL cacti database (Note: The password you will be prompted for is the one you just set.)
  +
**<code>/usr/bin/mysqladmin -u root -p create cacti</code>
  +
  +
*Log into the MySQL database and grant the <code>cactiuser</code> access to the cacti database
  +
**<code>/usr/bin/mysql -u root -p</code>
  +
<code><pre>
  +
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
  +
Bye
  +
</pre></code>
   
 
*Start Apache
 
*Start Apache

Revision as of 01:12, 21 April 2010


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

Install

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
Bye
  • 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.