MirrorNest
← Tutte le guide

Zabbix

Open-source infrastructure and network monitoring, alerting, and visualization.

Sistema: Ubuntu 22.04 LTSMonitoringNetworkingSito ufficiale ↗Documentazione ufficiale ↗
Questa guida è redatta a partire dalla documentazione ufficiale di Zabbix, linkata sopra — verifica sempre lì i nomi esatti di pacchetti/versioni prima di eseguire questi comandi su un server di produzione, poiché le versioni della distribuzione e del progetto cambiano nel tempo.
  1. 1Add the official Zabbix repository

    Zabbix ships its own APT repo per OS/version combo — check the official docs link above for the exact package matching your Zabbix version and Ubuntu release before running this.

    wget https://repo.zabbix.com/zabbix/6.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.4-1+ubuntu22.04_all.deb
    sudo dpkg -i zabbix-release_6.4-1+ubuntu22.04_all.deb
    sudo apt update
  2. 2Install the server, frontend, and agent

    sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent -y
  3. 3Create the database

    Run inside a MySQL/MariaDB shell (sudo mysql -uroot -p). Replace YOUR_PASSWORD with a real password.

    create database zabbix character set utf8mb4 collate utf8mb4_bin;
    create user zabbix@localhost identified by 'YOUR_PASSWORD';
    grant all privileges on zabbix.* to zabbix@localhost;
    set global log_bin_trust_function_creators = 1;
    quit;
  4. 4Import the initial schema

    zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix

    This can take a few minutes on a small VM — it's importing the full initial schema, not hanging.

  5. 5Set the database password in the server config

    Edit /etc/zabbix/zabbix_server.conf and set DBPassword to the same password used above.

    sudo nano /etc/zabbix/zabbix_server.conf
  6. 6Start and enable the services

    sudo systemctl restart zabbix-server zabbix-agent apache2
    sudo systemctl enable zabbix-server zabbix-agent apache2
  7. 7Finish setup in the browser

    Open http://your-server-ip/zabbix and follow the setup wizard.

    Default login is Admin / zabbix — change this immediately after your first login.