Monday, February 6, 2012

Cacti on CentOS 6 (Setting up the System)


Step 1: Installing RPM

I would recommend using the repository of repoforge.org. It has a large collection and I can get all the necessary RPMs there.




Step 2: Preparing SNMP

It is always a best practice to backup any configuration file before editing. To get SNMP ready to roll, we need to edit the following configuration file:




My Server IP is 192.168.10.13, and I have configured SNMP to match my requirements. Needless to say, your configuration should match your requirements.

Step 3: Testing SNMP



This command should produce a LOOOOOT of output






Step 4: MYSQL Configuration
The mySQL administrative password will be NEWPASSWORD. We would be creating another user 'cacti' with password 'cactipw' to create a database for cacti. The name of the database will be 'cacti'.




Step 5: Cacti Configuration
First, we need to find a file called 'cacti.sql'. Because the location of the file may vary based on the Linux Distribution or Cacti installation method, we run the following command to locate 'cacti.sql'




Time to automatically generate the table for cacti.



PHP might create some problems if the time zone is incorrect. For example, my timezone is Asia/Dhaka, and I have manually set the time zone to match this.





Time for some final tweaking



Step 6: HTTPD Configuration
By default, Cacti httpd configuration only allows localhost to access the Cacti page. However, in this case, we will not allow any such restrictions i.e. everyone can access the page and the ones who know the password would be able to view information.




We would be creating a soft link because in by default, CentOS looks for websites in the /var/www/html directory.







And finally we are ready to run the poller. Cron should automatically do it, but 



Basic Cacti configuration complete. Now, we can access Cacti by typing the URL http://192.168.1.13/cacti (your own machine IP of course) or http://hostname/cacti.

During the first run, Cacti would provide options for a new installation. The default paths are usually correct, but may be checked if needed.

After successful installation, the default username is admin with password admin. However, it's forced changed after first login.


 Hope it helps. In the next post, we would be discussing about how to add devices in Cacti.

No comments:

Post a Comment