install cacti on redhat 9

5 Jun

How to:

1. install redhat
2. select server
3. pick following options
web server
mail server
php mysql is selected
sql server make sure mysql is checked

after redhat is installed do the following;
1. install webmin 1.200-1
[root@yourhost /tmp]# gunzip webmin-1.200.tar.gz
[root@yourhost /tmp]# tar xf webmin-1.200.tar
[root@yourhost /tmp]# cd webmin-1.200
[root@yourhost /tmp/webmin-1.200]# ./setup.sh /usr/local/webmin

2. install rrdtool 1.0.33
make
make install

using webmin install the following under packages use rpmfind
1. net-snmp-utils net-snmp-utils 5.0.9-2.90.1
2. net-snmp net-snmp 5.0.9-2.90.1
3. php-snmp php-snmp 4.2.2-17

4. if mysql did not get installed mysql 3.23.54a-11
perl(CGI) is needed by mysql-3.23.54a-11
perl-DBD-MySQL perl-DBD-MySQL 2.1021-3
mysql-server-3.23.54a-11.i386.rpm
php-mysql 4.2.2-17

“mysql_setpermission”

make sure the following is running
sshd
mysqld
apached

install cacti-0.8.6d.tar.gz put in /var/www/html directory
do a tar zxvf cacti-0.8.6d.tar.gz
rename directory to cacti

1.

Extract the distribution tarball.

shell> tar xzvf cacti-version.tar.gz

2.

Create the MySQL database:

shell> mysqladmin –user=root create cacti

3.

Import the default cacti database:

shell> mysql cacti < cacti.sql 4. Optional: Create a MySQL username and password for Cacti. shell> mysql –user=root mysql
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY ‘somepassword’;
mysql> flush privileges;

5.

Edit include/config.php and specify the MySQL user, password and database for your Cacti configuration.

$database_default = “cacti”;
$database_hostname = “localhost”;
$database_username = “cactiuser”;
$database_password = “cacti”;

6.

Set the appropriate permissions on cacti’s directories for graph/log generation. You should execute these commands from inside cacti’s directory to change the permissions.

shell> chown -R cactiuser rra/ log/

(Enter a valid username for cactiuser, this user will also be used in the next step for data gathering.)
7.

Add a line to your /etc/crontab file similar to:

*/5 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1

Replace cactiuser with the valid user specified in the previous step.

Replace /var/www/html/cacti/ with your full Cacti path.
8.

Point your web browser to:

http://your-server/cacti/

Log in the with a username/password of admin. You will be required to change this password immediately. Make sure to fill in all of the path variables carefully and correctly on the following screen.

I quickly fixed it by uncommenting extension=mysql.so in my php.ini file.

i forgot to add the “extension=mysql.so” line to the /etc/php4/cli/php.ini