Installing Cacti on SuSE 9.3

I wanted to get a web accessible graph of system temperature from my server. There are a variety of methods, many building on top of the brilliant RRDtool package. Since it seemed to simplify configuration, I decided to try Cacti.

Cacti is available as a standard install package on SuSE (provided you have the DVD version of 9.3 Professional, the FTP tree is not fully populated yet).

Cacti installation instructions, manual, an installation walkthrough and a forum are all available, but none are quite correct for SuSE. I don't feel this is the fault of the documentation maintainers, the SuSE system is set up to allow the addition of many packages without editing central configuration files through the extensive use of included files and directories, no package maintainers can reasonably be expected to maintain instructions for every combination. This is really the job of the community: to document installs to help others.

The SuSE install bungs everything into /usr/share/cacti and also adds a file to the /etc/apache2/conf.d directory, which should be imported automatically by apache to set up the aliasing, so no links or copies into /srv/www/htdocs/ should be necessary.

It also adds /etc/cron.d/cacti so that crontab modification is not necessary.

However, the install doesn't get everything right. The following is based on a synthesis of the above instructions, and works for me !

Basic Install Steps

Based on the short instructions. Assumes that Apache and mySQL already installed. The YaST default install seemed to work for me. I also installed phpmyadmin, which is one way of checking Apache and mySQL are working before installing cacti.

1. [install via YaST instead]

2. Create mySQL database:

shell>mysqladmin --user=root --password create cacti

--password forces mySQL to ask for the mysql admin password.

3. Import default database:

shell>mysql --user=root --password cacti < /usr/share/cacti.sql

4. Create mySQL username and password:

shell> mysql --user=root --password mysql
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword';
mysql> flush privileges;
mysql> exit

5. Edit /usr/share/cacti/include/config.php

Specify the MySQL user, password and database for your Cacti configuration:
    $database_default = "cacti";
    $database_hostname = "localhost";
    $database_username = "cactiuser";
    $database_password = "cacti";

Obviously, substitute your password for "cacti"

6. Skip this, YaST seems to have done it OK.

7. Skip this step

YaST added the /etc/cron.d/cacti file, which has user wwwrun.

Extra Steps that seem to be needed:

8. Edit /etc/apache2/httpd.conf

Add index.php to the DirectoryIndex line (near line 163).

9. Modify apache alias and security setting:

Edit /etc/apache2/conf.d/cacti.conf a)Remove / on alias: Alias /cacti /usr/share/cacti b)Comment out the "deny" lines. Add Allow from All to use from other machines. My cacti.conf looks like this after editing:
    Alias /cacti /usr/share/cacti
    <Directory /usr/share/cacti >
       Options None
       Allow from 127.0.0.1
       Allow from All
    </Directory>
I'm an apache beginner, so educate yourself on the security of this section !

Restart Apache

shell>/etc/init.d/apache2 restart

11. Now browse to localhost/cacti

You should be able to log in as admin (password admin).

About this Entry

This page contains a single entry by David published on June 13, 2005 8:18 PM.

Slipstreaming Windows XP CD for Intel ICH5 was the previous entry in this blog.

That is not a carrot is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.