January 27, 2022
How to install Zabbix on CentOS 8

How To Install Zabbix 5.0 Monitoring Tool On CentOS 8

On this article we will discuss how to install and configure Zabbix 5.0 LTS version on CentOS 8 Linux operating system.


Zabbix is a free and open source monitoring solution for system and server, network, databases and applications that can be deployed everywhere. Zabbix is capable to monitor millions of metrics, such as CPU load, network utilization and disk space consumption, database utilisations and many more. Zabbix supports for many database systems, namely: MySQL, PostgreSQL, SQLite, and IBM DB2.

Zabbix works as a server-client, where the Zabbix server is serves as collector and processor metrics data and Zabbix client sends system information to the Zabbix server. Zabbix was initially developed by Alexei Vladishev and now actively supported by Zabbix LLC. The last stable version of Zabbix is version 5.0.3 which was released on August 24, 2020.

Zabbix 5.0 LTS new features, are :

  • Increased size of acknowledge messages from 255 to 4096 characters
  • Added support of LIBSSH to support newer platforms like RHEL 8
  • Support of Elasticsearch 7.x (7.4, 7.6)
  • Latest data displays data if filter is not set
  • Increased zabbix_sender time resolution to nanoseconds
  • Base64 processing in JavaScript using new functions atob() and btoa()
  • Do not log system.run[] for local use
  • Increased size of item key from 255 to 2048 characters
  • Ability to flush SNMP cache, SNMPv3 context changes
  • Faster hash function for internal operations
  • Documented how to do filtering for vmware.event monitoring
  • Improved consistency of map labels
  • Filter by individual severities for Monitoring→Problems
  • Ability to use user macros for IPMI user name and password
  • Remote monitoring of versions of Zabbix components
  • Added filter for discovery rules
  • New API method to get auditlog

Zabbix 5.0 LTS Installation On CentOS 8

We will install Zabbix 5.0 LTS on CentOS 8 operating system, the The installation process will consist of several stages, namely:

  1. Prerequisites
  2. Add Zabbix Repository
  3. Install Zabbix server, frontend, agent
  4. Create and Configure initial database
  5. Configure PHP for Zabbix frontend
  6. Start Zabbix server and agent processes


  • CentOS 8 Linux Operating
  • root privileges
  • MySQL or PostgreSQL database installed
    • On our installation, we will use MySQL 8 as for stroing Zabbix data. To verify MySQL was installed, just submit command line below :
    • # mysql -Version
    • MySQL 8 version
    • If you have no MySQL database installed on the system, just install it first. Follow this link for MySQL 8 installation on CentOS 8 operating system.
  • Webserver installed (Apache HTTP webserver or NGINX).
    • We need need web server for Zabbix to host its dashboard. On this case, we will use Apache web server. To verify if Apache Webserver was installed, just submit command line below.
    • # httpd -v
    • apache httpd version
    • If you have no Apache web server installed on the syste, just follow this link for Apache Webserver installation on CentOS 8.
  • PHP installed on the system
    • php -v
    • php -v

Adding Zabbix Repository

After all prerequisite were met, then the next step is to prepare the Zabbix installation. We will add Zabbix repository.

[root@otodiginet ~]# rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/8/x86_64/zabbix-release-5.0-1.el8.noarch.rpm
Retrieving https://repo.zabbix.com/zabbix/5.0/rhel/8/x86_64/zabbix-release-5.0-1.el8.noarch.rpm
warning: /var/tmp/rpm-tmp.jkjNEJ: Header V4 RSA/SHA512 Signature, key ID a14fe591: NOKEY
Verifying… ################################# [100%]
Preparing… ################################# [100%]
package zabbix-release-5.0-1.el8.noarch is already installed

Install Zabbix server, frontend, agent

On this section, we will execute a script for install Zabbix server, Zabbix frontend and Zabbix agent. Just submit comomand line below :

[root@otodiginet ~]# dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-agent

the output will be :

Zabbix installaton completed

Create and Configure initial database

On this section we will configure database that will be used for Zabbix data. On our example we are using MySQL database version 8. We will create new database and username.

[ramans@otodiginet ~]$ mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 8.0.17 Source distribution
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database zabbix character set utf8 collate utf8_bin;
Query OK, 1 row affected, 2 warnings (0.02 sec)
mysql> create user zabbix@localhost identified by 'NoMercy20#';
Query OK, 0 rows affected (0.01 sec)
mysql> grant all privileges on zabbix.* to zabbix@localhost;
Query OK, 0 rows affected (0.01 sec)
mysql> quit;
Creating Zabbix database on MySQL

After Zabbix database creation was succesfully done, then we will import initial schema and data. We will be prompted to enter your newly created password, on the last section.

[root@otodiginet ~]# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
Enter password:

Then we can see the data was populated as showing via MySQL Workbench below :

Zabbix Schema

The next step is setting database password for Zabbix application. It will be configured at the /etc/zabbix/zabbix_server.conf file. Put the password on that file.

[root@otodiginet ~]# vi /etc/zabbix/zabbix_server.conf
Option: DBPassword
Database password.
Comment this line if no password is used.
Mandatory: no

Configure PHP for Zabbix frontend

For this purpose, we will update the /etc/php-fpm.d/zabbix.conf file. Just uncomment the timezone. On this case, I will let it as defautl value.

Start Zabbix server and agent processes

Now, configuring all nescessary parameters has been done, the next step is to start up the Zabbix server services and Zabbix agent services. As ussually we will use the systemd methode for starting up the services.

[root@otodiginet ~]# systemctl restart zabbix-server zabbix-agent httpd php-fpm
[root@otodiginet ~]# systemctl enable zabbix-server zabbix-agent httpd php-fpm
Created symlink /etc/systemd/system/multi-user.target.wants/zabbix-server.service → /usr/lib/systemd/system/zabbix-server.service.
Created symlink /etc/systemd/system/multi-user.target.wants/zabbix-agent.service → /usr/lib/systemd/system/zabbix-agent.service.
Created symlink /etc/systemd/system/multi-user.target.wants/php-fpm.service → /usr/lib/systemd/system/php-fpm.service.

Then we verify its services by querying the Zabbix status.

[root@otodiginet ~]# systemctl status zabbix-server zabbix-agent httpd php-fpm
● zabbix-server.service - Zabbix Server
Loaded: loaded (/usr/lib/systemd/system/zabbix-server.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2020-09-30 00:54:26 PDT; 1min 21s ago
Main PID: 49141 (zabbix_server)
Tasks: 38 (limit: 49614)
Memory: 50.5M
CGroup: /system.slice/zabbix-server.service
├─49141 /usr/sbin/zabbix_server -c /etc/zabbix/zabbix_server.conf
├─49143 /usr/sbin/zabbix_server: configuration syncer [synced configuration in 0.068314 sec, idle 60 sec]
├─49154 /usr/sbin/zabbix_server: housekeeper [startup idle for 30 minutes]
├─49155 /usr/sbin/zabbix_server: timer #1 [updated 0 hosts, suppressed 0 events in 0.002679 sec, idle 59 sec]
├─49156 /usr/sbin/zabbix_server: http poller #1 [got 0 values in 0.009741 sec, idle 5 sec]
├─49157 /usr/sbin/zabbix_server: discoverer #1 [processed 0 rules in 0.002104 sec, idle 60 sec]
├─49158 /usr/sbin/zabbix_server: history syncer #1 [processed 4 values, 3 triggers in 0.022143 sec, idle 1 sec]
├─49159 /usr/sbin/zabbix_server: history syncer #2 [processed 0 values, 0 triggers in 0.000031 sec, idle 1 sec]
├─49160 /usr/sbin/zabbix_server: history syncer #3 [processed 0 values, 0 triggers in 0.000038 sec, idle 1 sec]
├─49161 /usr/sbin/zabbix_server: history syncer #4 [processed 0 values, 0 triggers in 0.000047 sec, idle 1 sec]
├─49162 /usr/sbin/zabbix_server: escalator #1 [processed 0 escalations in 0.003512 sec, idle 3 sec]
├─49163 /usr/sbin/zabbix_server: proxy poller #1 [exchanged data with 0 proxies in 0.000024 sec, idle 5 sec]
├─49164 /usr/sbin/zabbix_server: self-monitoring [processed data in 0.000022 sec, idle 1 sec]
├─49165 /usr/sbin/zabbix_server: task manager [processed 0 task(s) in 0.001265 sec, idle 5 sec]
├─49166 /usr/sbin/zabbix_server: poller #1 [got 0 values in 0.000108 sec, idle 1 sec]
├─49167 /usr/sbin/zabbix_server: poller #2 [got 0 values in 0.000041 sec, idle 1 sec]
├─49168 /usr/sbin/zabbix_server: poller #3 [got 1 values in 0.000317 sec, idle 1 sec]
├─49169 /usr/sbin/zabbix_server: poller #4 [got 0 values in 0.000047 sec, idle 1 sec]
├─49170 /usr/sbin/zabbix_server: poller #5 [got 0 values in 0.000139 sec, idle 1 sec]
├─49171 /usr/sbin/zabbix_server: unreachable poller #1 [got 0 values in 0.000078 sec, idle 5 sec]
├─49173 /usr/sbin/zabbix_server: trapper #1 [processed data in 0.000000 sec, waiting for connection]
├─49175 /usr/sbin/zabbix_server: trapper #2 [processed data in 0.000000 sec, waiting for connection]
├─49178 /usr/sbin/zabbix_server: trapper #3 [processed data in 0.000000 sec, waiting for connection]
├─49179 /usr/sbin/zabbix_server: trapper #4 [processed data in 0.004474 sec, waiting for connection]
├─49180 /usr/sbin/zabbix_server: trapper #5 [processed data in 0.000000 sec, waiting for connection]
├─49181 /usr/sbin/zabbix_server: icmp pinger #1 [got 0 values in 0.000019 sec, idle 5 sec]
├─49182 /usr/sbin/zabbix_server: alert manager #1 [sent 0, failed 0 alerts, idle 5.335679 sec during 5.335903 s>
├─49183 /usr/sbin/zabbix_server: alerter #1 started

Zabbix front-end setup page, can be accessed via web browser on URL : http://ip-address-zabix-server/zabbix/setup.php.

Installing Zabbix Front-End

On this section we will discuss how to install Zabbix front-end web interface. Zabbix frontend is written in PHP. There are several steps for Zabbix frontend installation as described below :

  • Open the Zabbix frontend URL in a browser. Our installation is using Apache web server, the URL will be http://server_ip_or_name/zabbix.
  • Zabbix front end installation
  • Check of pre-requisites. Make sure that all software prerequisites are met.
  • Zabbix front end Prerequisite
  • Configure DB connection. Enter details for connecting to the database. Zabbix database must already be created.
  • Zabbix DB configuration
  • Zabbix server details. Enter Zabbix server details.
  • Pre-installation summary. Review a summary of settings.
  • Install
  • Finish the installation.
  • Log in. Zabbix frontend is ready! The default user name is Admin and password zabbix.
  • Zabbix Login
  • Zabbix Dashboard
  • Zabbix dashboard


So far, we have installed Zabbix 5.0 LTS monitoring tools on CentOS 8 successfully. Zabbix front-end configuring will be discussed on other articles. See you…

Share this article via :

Leave a Reply

Your email address will not be published. Required fields are marked *