Install Zabbix 6.0 on Rocky Linux 9 with MySQL and Nginx

Ensure MySQL and Nginx are pre-installed on your Rocky Linux 9 system. Disable SELinux before proceeding with the installation.

  1. If the EPEL repository is configured, prevent it from conflicting with official Zabbix packages by editing /etc/yum.repos.d/epel.repo. Add or modify the following line under the [epel] section:
[epel]
...
excludepkgs=zabbix*
  1. Set up the official Zabbix repository for Rocky Linux 9:
# rpm -Uvh https://repo.zabbix.com/zabbix/6.0/rhel/9/x86_64/zabbix-release-latest-6.0.el9.noarch.rpm
# dnf clean all
  1. Install Zabbix Server, web frontend, agent, and supporting components:
# dnf install zabbix-server-mysql zabbix-web-mysql zabbix-nginx-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent
  1. Create and configure the Zabbix database and dedicated user in MySQL:
# mysql -uroot -p

Enter your MySQL root password when prompted, then run these commands:

create database zabbix character set utf8mb4 collate utf8mb4_bin;
create user zabbix@localhost identified by 'StrongZabbixPass123';
grant all privileges on zabbix.* to zabbix@localhost;
set global log_bin_trust_function_creators = 1;
quit;

This creates a dedicated database for Zabbix, a restricted user account, grants full permissions for the user on the Zabbix database, and temporarily enables a setting to allow stored function creation. Do not restart MySQL or the system at this stage to avoid breaking subsequent steps.

  1. Import the initial Zabbix database schema using the dedicated data base user:
# zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix

Enter the Zabbix database user password (StrongZabbixPass123) when prompted.

  1. Revert the temporary MySQL setting for stored function creasion:
# mysql -uroot -p

Enter your MySQL root password when prompted, then execute:

set global log_bin_trust_function_creators = 0;
quit;
  1. Configure Zabbix Server to connect to the MySQL database. Edit /etc/zabbix/zabbix_server.conf, locate the DBPassword line, uncomment it, and set it to your Zabbix database user's password:
DBPassword=StrongZabbixPass123
  1. Configure Nginx to serve the Zabbix web frontend. Edit /etc/nginx/conf.d/zabbix.conf, uncomment and update the listen and server_name directives to match your environment:
listen 8080;
server_name monitor.example.com;
  1. Start the core services and enable them to launch automatically on system boot:
# systemctl restart zabbix-server zabbix-agent nginx php-fpm
# systemctl enable zabbix-server zabbix-agent nginx php-fpm
  1. Adjust firewall settings based on your security requirements. To temporarily disable the firewall:
# systemctl stop firewalld.service

For production environments, open the Zabbix frontend port (8080) permanently instead:

# firewall-cmd --add-port=8080/tcp --permanent
# firewall-cmd --reload

Verify the port is open with:

# firewall-cmd --list-ports
  1. Access the Zabbix web setup wizard via your browser using the server's IP address or hostname and the configured port. For example:

http://10.0.0.50:8080/

Use the default credentials to log in:

  • Username: Admin
  • Password: zabbix

Tags: Rocky Linux 9 Zabbix 6.0 MySQL nginx system monitoring

Posted on Wed, 30 Sep 2026 16:34:11 +0000 by phpnoobguy