Cacti On CentOS 4.4 Including The Plug-in Architecture - Page 2
9 Create the MySQL Database and the Cacti user.
In this step, we create the Cacti user and group.
Now, we will create the database and grant permissions on it as needed.
mysql -u root -p
Enter your password and at the MySQL prompt, enter the following commands:
create database cacti;
Finally, let’s import the SQL file that will create the tables (remember that you will need to use your MySQL password to complete this command):
10 Set permissions on Cacti directories
Now we need to set some permissions to allow Cacti to function properly:
11 Implement CRON job for Cacti poller
We’re almost done with the manual configuration. Our last step is to schedule the Cacti poller to run every five minutes.
Now, press "Esc I" to enter edit mode within the vi editor and paste the following:
*/5 * * * * cactiuser /usr/bin/php /usr/local/cacti/poller.php > /dev/null 2>&1
Note: Be sure that when you paste this line into crontab, that it is all on one line. I'm not sure if it is a formatting issue or what, but sometimes when I paste it in, it wants to break off and place the "/dev/null 2>&1" section on a separate line which will cause the poller to fail.
Press the "Esc" key once to exit edit mode and then type the following and hit then enter key:
Before moving on, let's verify that your crontab looks correct. The following command will show you the contents of your cron job.
If everything looks good, then you can exit the cactiuser account and go back to the account you were previously working with. For example, if you were root, you would type the following:
12 Install Cacti
We are finally at the area where we begin to pull it all together. In the browser of your choice (most likely on another machine, unless you have opted for an X Window System on your server), enter your servers address into the address bar:
http://server IP address/cacti/
If you do have an X Windows system on your server, you could simply go to:
On the first screen, click "Next".
One the second screen, ensure that "New Install" is selected and click "Next".
On the third screen ensure that your paths match the ones shown below and that there are no errors. If you do see any errors or have paths not found, double check to ensure that you have installed everything, otherwise click on the "Finish" button.
RRDTool Binary Path: /usr/bin/rrdtool
At the login screen, the first time login is:
You will now be forced to change your password.
One final step is to change the settings for the RRDTool Default Font Path within Cacti to the proper setting. Under the ‘Configuration’ section of the Cacti menu, you should see a link for ‘Settings’. Now click on the ‘Paths’ tab and midway down the page, you should see ‘RRDTool Default Font Path’. In this area, enter the following:
Now click on the save button.
You should now have a fully functioning Cacti installation, although it will take a few minutes for the graphs to populate (they will not show images until the poller has run).
For additional information on how to expand your monitoring solution, I recommend the following sites: