← All guides
Cacti
Cacti is a mature RRDtool-based network graphing solution that polls devices over SNMP and renders historical performance graphs through a PHP/MySQL web front end.
This guide is synthesized from Cacti's own official documentation, linked above — always cross-check exact package/version names there before running these commands on a production server, since distro and project versions move over time.
1Install the LAMP stack and dependencies
apt-get update && apt-get install -y apache2 rrdtool mariadb-server snmp snmpd php8.1 php8.1-mysql php8.1-snmp php8.1-xml php8.1-mbstring php8.1-json php8.1-gd php8.1-gmp php8.1-zip php8.1-ldap composer2Download Cacti
git clone -b 1.2.x https://github.com/Cacti/cacti.gitmv cacti /var/www/html3Create the database and user
CREATE DATABASE cacti DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;CREATE USER 'cactiuser'@'localhost' IDENTIFIED BY 'cactiuser';GRANT ALL ON cacti.* TO 'cactiuser'@'localhost';GRANT SELECT ON mysql.time_zone_name TO 'cactiuser'@'localhost';ALTER DATABASE cacti CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;FLUSH PRIVILEGES;Run inside the mysql client (mysql -u root -p). Change the 'cactiuser' password before using this in production.
4Import the schema and configure config.php
mysql -u root cacti < /var/www/html/cacti/cacti.sqlcp /var/www/html/cacti/include/config.php.dist /var/www/html/cacti/include/config.phpEdit include/config.php with your database name, user, and password before continuing.
5Finish setup in the browser
Browse to the web installer to select paths, verify permissions, and complete first-run setup.
Open http://serverip/cacti in a browser.