MirrorNest
← Tous les 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.

Système : Ubuntu / Debian Linux (LAMP stack)Network MonitoringSite officiel ↗Documentation officielle ↗
Ce guide est élaboré à partir de la documentation officielle de Cacti, dont le lien figure ci-dessus — vérifiez toujours les noms exacts des paquets/versions avant d'exécuter ces commandes sur un serveur de production, car les versions de la distribution et du projet évoluent avec le temps.
  1. 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 composer
  2. 2Download Cacti

    git clone -b 1.2.x https://github.com/Cacti/cacti.git
    mv cacti /var/www/html
  3. 3Create 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.

  4. 4Import the schema and configure config.php

    mysql -u root cacti < /var/www/html/cacti/cacti.sql
    cp /var/www/html/cacti/include/config.php.dist /var/www/html/cacti/include/config.php

    Edit include/config.php with your database name, user, and password before continuing.

  5. 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.