When installing Zabbix, you have the choice between the LTS version (Long Term Support) and the latest version.
LTS Version Supported over a longer period and considered more stable. Recommended for production environments.
Latest Version Includes new features and up-to-date bug fixes, but might also introduce new bugs.
In most cases, the LTS version is the best choice unless you explicitly need new features or fixes.
For more information about the lifecycle and release policy, visit the official Zabbix website.
Installing the LTS Version (6.0)
wget https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.0-4%2Bubuntu22.04_all.deb
dpkg -i zabbix-release_6.0-4+ubuntu22.04_all.deb
apt update
Installing the Latest Version (6.2)
wget https://repo.zabbix.com/zabbix/6.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.2-4%2Bubuntu22.04_all.deb
dpkg -i zabbix-release_6.2-4+ubuntu22.04_all.deb
apt update
Installing the Required Packages
The following steps apply to both versions.
apt install zabbix-server-mysql \
zabbix-frontend-php \
zabbix-apache-conf \
zabbix-sql-scripts \
zabbix-agent
Configuring the Database
Zabbix requires a database to store its data. Supported are MySQL and PostgreSQL. This guide uses MySQL.
Creating the Database and User
Log in to MySQL (root access):
mysql -uroot -p
Then execute the following commands (adjust data as needed):
create database zabbix character set utf8mb4 collate utf8mb4_bin;
create user zabbix@localhost identified by 'password';
grant all privileges on zabbix.* to zabbix@localhost;
set global log_bin_trust_function_creators = 1;
quit;
Importing the Database Schema
zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | \
mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
You will be prompted for the password set earlier.
Resetting the Security Option
Log in to MySQL again:
mysql -uroot -p
Then execute:
set global log_bin_trust_function_creators = 0;
quit;
Configuring Zabbix
The database access credentials must now be saved in the Zabbix configuration.
Open the file:
nano /etc/zabbix/zabbix_server.conf
Set or adjust the following values:
DBName=zabbix
DBUser=zabbix
DBPassword=password
Starting and Enabling Services
After completing the configuration, restart the services and enable them on boot:
systemctl restart zabbix-server zabbix-agent apache2
systemctl enable zabbix-server zabbix-agent apache2
Accessing the Web Interface
Zabbix is then accessible at:
http://<your-server-hostname-or-ip>/zabbix
Follow the web-based initial setup (PHP check, database verification, admin login).