We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

Learn how to – How To Install Zabbix 6 on RHEL 8 | CentOS Stream 8

Learn how to – How To Install Zabbix 6 on RHEL 8 | CentOS Stream 8.

Zabbix is free and open-source ultimate enterprise-level software for monitoring and performance analysis of components, applications, and services. With Zabbix, it is easy to identify faults and errors when they occur on a system and send alerts to the response team. This helps ensure business continuity. Zabbix is built with a core is written in C and Java languages with a PHP frontend.

Zabbix server works using a server-client model whereby the Zabbix server communicates to the native clients called Zabbix agents which can be Linux, Windows, or NIX systems.

For better understanding, below is a diagram for the Zabbix Architecture.

The latest stable release, Zabbix 6.0 LTS offers the following amazing features:

  • High availability, performance and scalability – Zabbix 6.0 LTS has proxies to provide automatic load balancing and HA, native HA setup for Zabbix Server, a scalable history storage and API performance improvements.
  • Machine learning for baseline monitoring with advanced anomaly detection.
  • Security improvements with password complexity policy for Zabbix UI and audit log for all user and API operations being added.
  • Event correlation and enterprise alarm console – It has the ability to perform event filtering, de-duplication and aggregation using event preprocessing rules, the ability to manually hide and suspend problems for a period of time as well as a problem view that is optimised for faster problem resolution and collaborative work.
  • Advanced visualization and reporting – this comprises of stacked graphs, graph annotations, advanced host status widgets, events over time widget, geographical maps e.t.c
  • Business service monitoring (BSM) with support for alerting on service status changes, multi-tenancy for Services, impact analysis, import/export for service tree, ability to scale to 100K of business services e.t.c

By following this guide to the end, you should be able to install and configure Zabbix 6.0 LTS on RHEL 8 | CentOS Stream 8.

Getting Started.

Before we begin the installation, we need to ensure that all the system packages are updated to their latest versions.

sudo yum update

Also, you are required to set SELinux in permissive mode as below.

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

Now proceed to Zabbix 6.0 LTS installation as below.

Step 1 – Install the Zabbix 6 Packages on RHEL 8 | CentOS Stream 8

We will begin by adding the Zabbix 6.0 LTS repository on our RHEL 8 | CentOS Stream 8 system as below.

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

Now with the repository added, install Zabbix server, agent and Apache as below.

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

Step 2 – Install and Configure the Zabbix database

For this guide, we will use the MariaDB database. Zabbix 6.0 LTS recommends a MariaDB version greater than or equal to 10.5. In this guide, we will install MariaDB 10.6 on RHEL 8 | CentOS Stream 8.

First, add the MariaDB repository.

curl -LsS -O https://downloads.mariadb.com/MariaDB/mariadb_repo_setup
sudo bash mariadb_repo_setup --mariadb-server-version=10.8

Now install MariaDB server and client as below.

sudo dnf install MariaDB-server MariaDB-client

Start and enable MariaDB.

sudo systemctl start mariadb && sudo systemctl enable mariadb
sudo mariadb-secure-installation

Log in to the MariaDB database and a Zabbix database as below.

$ sudo mysql -u root
CREATE DATABASE zabbix character set utf8mb4 collate utf8mb4_bin;
CREATE USER zabbix@localhost IDENTIFIED by 'Passw0rd';
GRANT ALL PRIVILEGES ON zabbix.* TO zabbix@localhost;

Now import the initial schema and data as below.

sudo zcat /usr/share/doc/zabbix-sql-scripts/mysql/server.sql.gz | mysql -uzabbix -p'Passw0rd' zabbix

Step 3 – Configure the Zabbix 6.0 Server on RHEL 8 | CentOS Stream 8

We will then proceed to the Zabbix server configuration and add our database details as below.

$ sudo vi /etc/zabbix/zabbix_server.conf

Apply the changes by restarting the Zabbix server.

sudo systemctl restart zabbix-server

Edit your timezone in the apache configuration by adding the line.

$ sudo vi /etc/php-fpm.d/zabbix.conf
php_value[date.timezone] = Africa/Nairobi

For this guide, we will set our Zabbix server to monitor itself as below.

$ sudo vi /etc/zabbix/zabbix_agentd.conf

Now start and enable the Zabbix server/agent and Apache services.

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

You can also manage a separate RHEL 8 | CentOS Stream 8 Zabbix agent using the aid of the guide below.

For the Zabbix web UI to be accessible, we need to allow the below ports through the firewall.

sudo firewall-cmd --add-service={http,https} --permanent
sudo firewall-cmd --add-port={10051/tcp,10050/tcp} --permanent
sudo firewall-cmd --reload

Step 4 – Access the Zabbix 6.0 web UI on RHEL 8 | CentOS Stream 8

Access the Zabbix 6.0 web interface using the URL http://IP_Address/zabbix/ or http://domain_name/zabbix/

You will see this page:

Proceed and confirm if all the requirements are met.

Add your database details as shown.

Set your Zabbix server name and also your preferred theme.

You will be granted a preview of the made settings. If they are correct, proceed to the installation.

Once the installation is successful, proceed as below.

Click Finish and you will be redirected to the login page. Provide the default login credentials.

Username: "Admin"
Password: "zabbix"

The credentials should be filled in as below.

On successful login, you will be able to see the Zabbix dashboard.

You can now change your admin password by navigating to Administration > Users > Admin > Password > Change Password

With your preferred password entered, click Update to save the changes.

Step 5 – Configure Zabbix Monitoring Target host

For this guide, we set the Zabbix server to monitor itself. While at the Zabbix dashboard, navigate to Configuration > Hosts. Here you can add a Zabbix agent by clicking on create host. But for this case, we already have our local host listed and enabled.

This shows that the server can be monitored. After a few minutes, the monitoring data using graphs should be available under Monitoring > Hosts > Server name.


I hope you enjoyed this amazing guide on how to install and configure Zabbix 6.0 LTS on RHEL 8 | CentOS Stream 8.

Interested in more?


Your Cart is Empty

Back To Shop