I deployed Zabbix monitoring on a virtual machine running TurnKey Linux Core, a lightweight Debian-based distribution. The project involved installing Zabbix Server, setting up MariaDB, and configuring the services required for the monitoring system.
Install and configure Zabbix Server on a lightweight Linux distribution.
Set up MariaDB to store Zabbix monitoring data.
Configure the connection between Zabbix Server and the database.
Install the Zabbix web interface and agent for monitoring.
Prepare the server for accessing the Zabbix web interface and monitoring infrastructure.
Operating System: TurnKey Linux Core (Debian 12-based environment)
Monitoring: Zabbix 7.4
Database: MariaDB
Web Server: Apache HTTP Server
Monitoring Agent: Zabbix Agent 2
Virtualization: Virtual Machine (VM)
Zabbix can be installed on several Linux distributions. I chose TurnKey Linux Core because it is lightweight, has a relatively small footprint, and includes several preinstalled system administration tools.
The installation process for TurnKey Linux is documented in a separate project, so I have omitted those steps here to keep this report concise.
After installing the operating system, I configured a static IP address, DNS server, and default gateway. I also set the correct time zone to ensure that system logs and monitoring data use the appropriate local time.
Next, I updated the package lists and upgraded the installed packages.
apt update && apt upgrade -y
After rebooting the machine, the operating system was ready for the Zabbix installation.
Zabbix requires a database to store its configuration, monitoring history, and other operational data. I chose MariaDB and installed it on the same server as Zabbix.
apt install mariadb-server -y
After installation, I started and enabled the MariaDB service so that it would run automatically at system startup.
systemctl start mariadb
systemctl enable mariadb
I then checked the service status to verify that it was running correctly.
systemctl status mariadb
To secure the database installation, I ran mysql_secure_installation. This utility helps apply basic security measures, such as removing anonymous database accounts, restricting remote root access, and removing the default test database.
mysql_secure_installation
I followed the official Zabbix installation instructions for Debian 12 and selected Zabbix 7.4.
First, I downloaded and installed the Zabbix repository package to configure the system to use the official Zabbix package repository.
wget https://repo.zabbix.com/zabbix/7.4/release/debian/pool/main/z/zabbix-release/zabbix-release_latest_7.4+debian12_all.deb
dpkg -i zabbix-release_latest_7.4+debian12_all.deb
I then installed the following components as instructions said on the installation guide page:
apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent2
apt install zabbix-agent2-plugin-mongodb zabbix-agent2-plugin-mssql zabbix-agent2-plugin-postgresql
Next, I configured MariaDB for Zabbix. I created a database , and also created a dedicated database user named zabbix and granted it privileges on the Zabbix database.
# mysql -uroot -p
PASSWORD
create database zabbix character set utf8mb4 collate utf8mb4_bin;
create user zabbix@localhost identified by 'P@ssw0rd';
grant all privileges on zabbix.* to zabbix@localhost;
set global log_bin_trust_function_creators = 1;
quit;
The remaining commands I used are listed below. They import the Zabbix database schema, disable the temporary database setting used during the import, configure the database password in the Zabbix Server configuration file, and restart and enable the required services.
zcat /usr/share/zabbix/sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p Zabbix
mysql -uroot -p
PASSWORD
set global log_bin_trust_function_creators = 0;
quit;
DBPassword=P@ssw0rd
systemctl restart zabbix-server zabbix-agent2 apache2
systemctl enable zabbix-server zabbix-agent2 apache2