Zabbix is a comprehensive monitoring system that allows us to monitor multiple servers in real time, monitoring networks as well as tracking applications and systems. The core is written in C and Java, with a PHP frontend.
Zabbix helps identify failures and errors quickly and effectively. It uses a server/client architecture in which the server communicates with native clients, called 'Zabbix Agents'.
Zabbix Agent clients can be Windows, Linux, macOS, AIX, FreeBSD, HPUX, NetBSD, OpenBSD, SLES, Solaris, Tru64 systems
Update the system and install MariaDB
# apt update && apt upgrade
Zabbix 7.0 LTS requires MariaDB version 10.5 or later.
Add the MariaDB repository.
# apt -y install software-properties-common curl # curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash -s -- --mariadb-server-version="mariadb-11.0"
Install MariaDB
# apt update
# apt -y install mariadb-server mariadb-client
Once installed, log in to the shell and create the DB.
# mysql -u root
CREATE DATABASE zabbix character set utf8mb4 collate utf8mb4_bin; CREATE USER zabbix@localhost IDENTIFIED by 'Password'; GRANT ALL PRIVILEGES ON zabbix.* TO zabbix@localhost; FLUSH PRIVILEGES; QUIT
Strong password
Remember to set a strong password for your user and database. This is just an example, and "Password" is not a strong password.
Install Zabbix 7.0 LTS on Ubuntu
By default, the Zabbix repository is not available on Ubuntu 22.04, 20.04 or 18.04. You therefore need to install the Zabbix repository on the system.
# wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest_7.0+ubuntu24.04_all.deb # dpkg -i zabbix-release_latest_7.0+ubuntu24.04_all.deb # apt update
# wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest_7.0+ubuntu22.04_all.deb # dpkg -i zabbix-release_latest_7.0+ubuntu22.04_all.deb # apt update
# wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest_7.0+ubuntu20.04_all.deb # dpkg -i zabbix-release_latest_7.0+ubuntu20.04_all.deb # apt update
# wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest_7.0+ubuntu18.04_all.deb # dpkg -i zabbix-release_latest_7.0+ubuntu18.04_all.deb # apt update
Once downloaded, proceed to install Zabbix, which includes the server and agent, along with the apache and PHP configuration.
# apt install zabbix-agent zabbix-server-mysql php-mysql zabbix-frontend-php zabbix-sql-scripts zabbix-apache-conf
Once installed, check the installed version.
# apt-cache policy zabbix-server-mysql
Proceed to import the DB.
# zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mariadb --default-character-set=utf8mb4 -uzabbix -p zabbix
The import process will take a few seconds.
Configure the Zabbix 7.0 server
Once the Zabbix server is installed, proceed to configure it; look for DBName, DBUser and DBPassword. (You need to uncomment #DBPassword).
# nano /etc/zabbix/zabbix_server.conf
DBName=zabbix
DBUser=zabbix
DBPassword=Password
Restart Zabbix.
# systemctl restart zabbix-server
Configure the Zabbix agent to monitor the server itself.
# nano /etc/zabbix/zabbix_agentd.conf
Look for the server IP and hostname settings.
Server=127.0.0.1 Hostname=Zabbix server
Start and enable the Zabbix server and agent.
# systemctl restart zabbix-server zabbix-agent apache2 # systemctl enable zabbix-server zabbix-agent apache2
Alternatively, you can add a standalone Zabbix agent by following this guide Install and configure Zabbix Agent on Ubuntu 20.04 | 18.04.
Access the Zabbix web interface
You can access the web interface using
URL http://IP/zabbix/ or http://dominio/zabbix/
If it has been installed correctly, you should be able to see the welcome page.
In the following image, you can see whether the installed services meet the requirements for proper operation.
Configure the connection to the DB.
Proceed with the Zabbix configuration; finally, if the configuration is correct, you should see the following message.
Once the configuration is complete, you will be redirected to the panel login, where you will need to use the default credentials.
Username: Admin
Password: zabbix
Once logged in, it is recommended that you change the admin password.
Users > Users > Admin > Password > Change Password
Configure Zabbix Monitoring
In the configuration in this guide, we will monitor the server itself.
Log in to the administrator panel Data collection > Hosts
You should see the localhost status as enabled.
This shows that the server is ready to be monitored. Wait a few minutes and the monitoring data will be available. You can check it under Monitoring > Hosts > Server name > Graphs
If you want to add a Zabbix client to monitor other servers, we recommend the following guide Install and configure Zabbix Agent on Ubuntu 24.04, 22.04, 20.04 or 18.04.