Extract the distribution tarball.
- tar xzvf cacti-version.tar.gz
Create the MySQL database:
- mysqladmin --user=root -p create cacti
Import the default cacti database:
Create a MySQL username and password for Cacti.
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword';
mysql> flush privileges;
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";
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.
- chown -R cactiuser rra/ log/
(Enter a valid username for cactiuser, this user will also be used in the next step for data gathering.)
Add a line to your /etc/crontab file similar to:
- */5 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1
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.