MirrorNest
← Todas las guías

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.

Sistema: Ubuntu / Debian Linux (LAMP stack)Network MonitoringSitio oficial ↗Documentación oficial ↗
Esta guía se elaboró a partir de la documentación oficial de Cacti, enlazada arriba — verifica siempre ahí los nombres exactos de paquetes/versiones antes de ejecutar estos comandos en un servidor de producción, ya que las versiones de la distribución y del proyecto cambian con el tiempo.
  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.