Zabbix 5.2 in Centos 8 v1
Zabbix 5.2 in Centos 8 v1
Zabbix is an open source monitoring tool that can be deployed on-premises or on the cloud depending on
that you intend to monitor. With Zabbix, you can monitor a variety of devices: from physical servers, and
network devices such as routers and switches on your IT infrastructure as well as cloud infrastructure.
The latest release of Zabbix is Zabbix 5.0 LTS. Zabbix gives users the ability to perform the following
tasks:
In this guide, we will discuss how to install and configure Zabbix monitoring tool on CentOS 8 / RHEL
8.
Prerequisites:
Before getting started, ensure that the following requirements are fulfilled:
An instance of CentOS 8 with a minimum of 2GB RAM and 10 GB available disk space.
A regular login user with sudo privileges
Stable Internet Connection
https://www.linuxtechi.com/install-zabbix-monitroing-tool-centos-8-rhel-8/ 1/15
09/11/2022 15:15 How to Install Zabbix Monitoring Tool on CentOS 8/RHEL 8
For Zabbix to run smoothly without any issues, it’s recommended that you turn off SELinux. SELinux is
enabled by default and you can check the status by running the command:
$ sestatus
Reboot your CentOS 8 or RHEL 8 system for the changes to come to effect.
$ sudo reboot
https://www.linuxtechi.com/install-zabbix-monitroing-tool-centos-8-rhel-8/ 2/15
09/11/2022 15:15 How to Install Zabbix Monitoring Tool on CentOS 8/RHEL 8
Once above packages have been installed successfully then start the webserver and MariaDB database
engine as shown
Once the LAMP stack is in place, you need to configure a database for Zabbix server to store its files.
Before setting up the database for Zabbix, first set mysql root password, disable remote root logins and
delete test database. Execute “mysql_secure_installation” command, example is shown below:
$ sudo mysql_secure_installation
https://www.linuxtechi.com/install-zabbix-monitroing-tool-centos-8-rhel-8/ 4/15
09/11/2022 15:15 How to Install Zabbix Monitoring Tool on CentOS 8/RHEL 8
$ mysql -u root -p
Use the same root password that you have set in above command.
The create a database user (zabbix_user) and grant then grant all rights on the database.
Finally, reload the grants table for the changes to take effect and exit
FLUSH PRIVILEGES;
EXIT;
https://www.linuxtechi.com/install-zabbix-monitroing-tool-centos-8-rhel-8/ 5/15
09/11/2022 15:15 How to Install Zabbix Monitoring Tool on CentOS 8/RHEL 8
The database for Zabbix is in place, now configure Zabbix repository and install Zabbix server in next
steps.
https://www.linuxtechi.com/install-zabbix-monitroing-tool-centos-8-rhel-8/ 6/15
09/11/2022 15:15 How to Install Zabbix Monitoring Tool on CentOS 8/RHEL 8
You will get the output below as a confirmation that Zabbix and associated dependencies have been
installed
https://www.linuxtechi.com/install-zabbix-monitroing-tool-centos-8-rhel-8/ 7/15
09/11/2022 15:15 How to Install Zabbix Monitoring Tool on CentOS 8/RHEL 8
You can now proceed and start Zabbix server, agent, Apache web server and PHP-FPM
By default, Zabbix server listens on port 10050 while the Zabbix agent listens on port 10051. You can
confirm if the 2 services are listening by running the netstat command as shown:
Note: If netstat command is not installed on your system then first installed it using the command :
$ cd /usr/share/doc/zabbix-server-mysql/
$ sudo zcat create.sql.gz | mysql -u zabbix_user -p zabbix_db
In above command specify the zabbix_user password that we have created during Zabbix database
creation. (In my case zabbix_user password would be P@ssw0rd@123#)
Next, specify the Zabbix database information in the zabbix.conf file as shown
https://www.linuxtechi.com/install-zabbix-monitroing-tool-centos-8-rhel-8/ 8/15
09/11/2022 15:15 How to Install Zabbix Monitoring Tool on CentOS 8/RHEL 8
$ sudo vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix_db
DBUser=zabbix_user
DBPassword=P@ssw0rd@123#
For example, to set timezone in London, Europe, edit the file as shown
php_value[date.timezone] = Europe/London
Once you are done, save and exit. Then, restart the Zabbix services and PHP-FPM to effect the changes
made.
https://www.linuxtechi.com/install-zabbix-monitroing-tool-centos-8-rhel-8/ 9/15
09/11/2022 15:15 How to Install Zabbix Monitoring Tool on CentOS 8/RHEL 8
To allow Zabbix agent from other servers to access the Zabbix Server, you need to open the Zabbix ports
and port 80 associated with Apache web server on the firewall. Therefore, run the commands below:
http://server-ip/zabbix
You will get a ‘Welcome’ page as shown: Click ‘Next Step’ to proceed to the next step
The next page displays all the prerequisites needed for the installation of Zabbix. If some errors are
displayed, click on the ‘Back’ button and install what’s missing. If there are no errors as shown, click
‘Next step’ to go ahead with the installation.
https://www.linuxtechi.com/install-zabbix-monitroing-tool-centos-8-rhel-8/ 10/15
09/11/2022 15:15 How to Install Zabbix Monitoring Tool on CentOS 8/RHEL 8
In the next step, provide the database details as shown and click ‘Next step’
https://www.linuxtechi.com/install-zabbix-monitroing-tool-centos-8-rhel-8/ 11/15
09/11/2022 15:15 How to Install Zabbix Monitoring Tool on CentOS 8/RHEL 8
Next, specify the name of your database server as indicated in the ‘Name’ text field. Leave other details
just as they are and click ‘Next Step’
https://www.linuxtechi.com/install-zabbix-monitroing-tool-centos-8-rhel-8/ 12/15
09/11/2022 15:15 How to Install Zabbix Monitoring Tool on CentOS 8/RHEL 8
The next page presents you with a summary of the database information that you have provided. If all is
good, click ‘Next Step’. Else go back and make corrections if need be.
If the details you provided are correct, you will get a notification below indicating that you have
successfully installed Zabbix server. Click ‘Finish’.
https://www.linuxtechi.com/install-zabbix-monitroing-tool-centos-8-rhel-8/ 13/15
09/11/2022 15:15 How to Install Zabbix Monitoring Tool on CentOS 8/RHEL 8
A login page will be displayed below: Use Admin as the username and zabbix as the password to sign
in.
https://www.linuxtechi.com/install-zabbix-monitroing-tool-centos-8-rhel-8/ 14/15
09/11/2022 15:15 How to Install Zabbix Monitoring Tool on CentOS 8/RHEL 8
https://www.linuxtechi.com/install-zabbix-monitroing-tool-centos-8-rhel-8/ 15/15