Zabbix is a mature, enterprise-grade open-source monitoring platform capable of tracking availability, performance, and log data for thousands of hosts from a single server. It ships with auto-discovery, customizable triggers, rich alerting integrations, and a polished web interface. Installing Zabbix 6.x on RHEL 8 takes roughly thirty minutes and gives you production-ready monitoring backed by a MySQL database. This tutorial covers adding the official Zabbix repository, installing the server and agent packages, initializing the database schema, and completing setup through the web installer.

Prerequisites

  • A RHEL 8 server with a non-root sudo user
  • MySQL 8.0 or MariaDB 10.5+ installed and running (dnf install -y @mysql)
  • NGINX or Apache installed to serve the Zabbix web frontend
  • SELinux in enforcing mode — the zabbix-selinux-policy package handles required policy modules
  • Port 10051 (Zabbix server) and 80/443 (web UI) accessible through the firewall

Step 1 — Add the Zabbix 6.x Repository

Zabbix provides an official RPM release package that drops a .repo file into /etc/yum.repos.d/. Install it with rpm -Uvh, then clear the DNF cache to ensure the new repository is visible.

sudo rpm -Uvh https://repo.zabbix.com/zabbix/6.4/rhel/8/x86_64/zabbix-release-6.4-1.el8.noarch.rpm
sudo dnf clean all

# Install server, web frontend, agent, schema scripts, and SELinux policy
sudo dnf install -y 
  zabbix-server-mysql 
  zabbix-web-mysql 
  zabbix-nginx-conf 
  zabbix-sql-scripts 
  zabbix-selinux-policy 
  zabbix-agent

sudo dnf module switch-to php:7.4 -y

Step 2 — Create the MySQL Database and User

Zabbix requires a dedicated MySQL database with utf8mb4 character encoding. Connect to MySQL as root and create both the database and the application user, then grant the necessary privileges.

sudo mysql -uroot <<'SQLEOF'
CREATE DATABASE zabbix CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
CREATE USER 'zabbix'@'localhost' IDENTIFIED BY 'StrongPassword123!';
GRANT ALL PRIVILEGES ON zabbix.* TO 'zabbix'@'localhost';
SET GLOBAL log_bin_trust_function_creators = 1;
FLUSH PRIVILEGES;
SQLEOF

Step 3 — Import the Zabbix Database Schema

The zabbix-sql-scripts package provides a compressed schema dump. Pipe it directly into MySQL. This step can take a few minutes on slower hardware because the default schema includes a large dataset of built-in templates.

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

# After import, disable log_bin_trust_function_creators
sudo mysql -uroot -e "SET GLOBAL log_bin_trust_function_creators = 0;"

Step 4 — Configure the Zabbix Server

Edit /etc/zabbix/zabbix_server.conf to set the database connection parameters. The four directives below are the minimum required; leave all other settings at their defaults for an initial deployment.

sudo sed -i 
  -e 's/^# DBHost=.*/DBHost=localhost/' 
  -e 's/^DBName=.*/DBName=zabbix/' 
  -e 's/^DBUser=.*/DBUser=zabbix/' 
  -e 's/^# DBPassword=.*/DBPassword=StrongPassword123!/' 
  /etc/zabbix/zabbix_server.conf

# Verify the four lines
grep -E "^DB(Host|Name|User|Password)" /etc/zabbix/zabbix_server.conf

Step 5 — Configure NGINX and Start All Services

The zabbix-nginx-conf package drops a ready-made NGINX virtual host at /etc/nginx/conf.d/zabbix.conf. Set the listen port and server_name, then start the Zabbix server, agent, NGINX, and PHP-FPM services together.

# Set server_name to your server IP or hostname
sudo sed -i 
  -e 's/#        listen.*/        listen 80;/' 
  -e 's/#        server_name.*/        server_name _;/' 
  /etc/nginx/conf.d/zabbix.conf

sudo systemctl enable --now zabbix-server zabbix-agent nginx php-fpm
sudo systemctl status zabbix-server

# Open firewall
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-port=10051/tcp
sudo firewall-cmd --reload

Step 6 — Complete Setup via the Web Installer

Open http://<server-ip>/zabbix in a browser. The web installer walks through six screens: welcome, prerequisites check, database connection (enter the credentials from Step 2), Zabbix server details (host localhost, port 10051), pre-installation summary, and finish. After completing the wizard, log in with the default credentials Admin / zabbix and immediately change the password under User settings → Change password.

# Confirm Zabbix server is running and connected to the database
sudo grep "Starting Zabbix Server" /var/log/zabbix/zabbix_server.log
sudo tail -20 /var/log/zabbix/zabbix_server.log

# Confirm the agent is reporting in
sudo zabbix_agentd -t system.uptime

Conclusion

You have installed and configured a fully operational Zabbix 6.x monitoring server on RHEL 8 backed by a MySQL database. The Zabbix agent running on the local host is already being monitored, and the web interface is accessible for adding additional hosts, configuring triggers, and setting up notification media. The SELinux policy package installed alongside the server handles all required label adjustments automatically, so SELinux enforcement does not need to be relaxed. From here you can scale by installing the Zabbix agent or agent2 on remote RHEL, CentOS, Ubuntu, and Windows hosts, then importing them through the web interface under Configuration → Hosts → Create host.

Next steps: Adding Remote Linux Hosts to Zabbix Monitoring, Creating Custom Zabbix Triggers and Alert Notifications, and Setting Up Zabbix Auto-Discovery for Dynamic Environments.