Search This Blog

How to install zabbix Server on Rocky Linux 9

How to set up Zabbix Server on Rocky Linux 9

1. Set Selinux to permissive mode

sudo setenforce 0
sudo sed -i 's/^SELINUX=.*/SELINUX=permissive/g' /etc/selinux/config
cat /etc/selinux/config | grep SELINUX=

2. Install and Configure Zabbix Server

Add zabbix repository to server.

sudo rpm -Uvh https://repo.zabbix.com/zabbix/7.0/rocky/9/x86_64/zabbix-release-7.0-5.el9.noarch.rpm
sudo dnf clean all

Install Zabbix server, frontend, agent.

sudo dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent

3. Install and configure Mariadb database Server

Install Mariadb database server.

sudo dnf install mariadb-server mariadb -y

Restart and enable Mariadb service.

sudo systemctl start mariadb && sudo systemctl enable mariadb

Secure Mariadb instance.

sudo mariadb-secure-installation

Create Database for Zabbix Server.

mysql -u root -p
CREATE DATABASE zabbix character set utf8mb4 collate utf8mb4_bin;
CREATE USER zabbix@localhost IDENTIFIED by 'Khmer-EmpireP@$$';
GRANT ALL PRIVILEGES ON zabbix.* TO zabbix@localhost;
FLUSH PRIVILEGES;
QUIT

Import initial schema and data to the zabbix database.

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

Disable log_bin_trust_function_creators option after importing database schema.

mysql -uroot -p
set global log_bin_trust_function_creators = 0;
quit;

4. Configure zabbix Server

Configure Zabbix. Open zabbix server configuration.

vim /etc/zabbix/zabbix_server.conf
DBName=zabbix
DBUser=zabbix
DBPassword=Khmer-EmpireP@$$

Configure your timezone in zabbix frontend.

sudo vim /etc/php-fpm.d/zabbix.conf
php_value[date.timezone] = Asia/Phnom_Penh

Restart and Enable service.

sudo systemctl restart zabbix-server zabbix-agent httpd php-fpm
sudo systemctl enable zabbix-server zabbix-agent httpd php-fpm

Allow zabbix web service in firewalld.

sudo firewall-cmd --add-port={80,443}/tcp --permanent
sudo firewall-cmd --reload

5. Set up Zabbix in Web UI

The default URL for Zabbix UI when using Apache web server is http://host/zabbix.
The default user and password Admin:zabbix

How to install zabbix Server on Rocky Linux 9

How to set up Zabbix Server on Rocky Linux 9 1. Set Selinux to permissive mode sudo setenforce 0 sudo sed -i...