From SysadminPunk Wiki!
apt-get install cacti
- Pretty sure this is all you need to do now-a-days with Debian and Ubuntu, but for a manual install continue with the following setup procedures:
Manual Install
apt-get install cacti
- For cacti create a new user called cacti using the following command
adduser cacti
- Create the MySQL database:
shell> mysqladmin --user=root create cacti
- Import the default cacti database:
shell> mysql cacti < cacti.sql
- 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;
- 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.
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.)
- 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.
- 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.
Ubuntu
- Follow this guide: http://openmaniak.com/cacti_tutorial.php
- If you need to reconfigure: dpkg-reconfigure cacti
- Default Password for cacti admin should be admin, but just in case you need to reset password:
mysql -p
Enter Password:
mysql> use cacti
Database Changed
mysql> update user_auth set password = md5('admin') where username = 'admin';