How to Install and Configure Zabbix Agent on Linux RHEL / Linux CentOS 8 VPS, VDS, Linux server

Server monitoring is one of the important things that is needed. To provide the best quality. Each monitoring system has a different approach. Depending on your infrastructure you would need to set it up independently with a back since the monitoring system can also fail. Each monitoring system requires a user to be installed on the client's device. In this case, we will show you, how you can install Zabbix Agent on a Linux Centos 8 server-based OS system.

The Zabbix agent runs on client machines, collects and sends data to the Zabbix server. Therefore, all remote machines must be provided with a client for the server to work. We recently installed the Zabbix server. In this tutorial, we will walk through the necessary steps to install and configure the Zabbix agent on CentOS 8.

We all know, that SELinux in most servers and VPS is enabled but y default, but we think it is better to disable SELinux for Zabbix to work correctly, well don't worry you can configure iptables-service to provide better security. So, open the configuration file.

nano /etc/selinux/config

Set SELinux to disabled.


Save and close the file, and then restart the system.

Now let's Installing Zabbix agent

Now add the Zabbix repository to be able to install the agent.

rpm -Uvh

Let’s install the Zabbix agent package.

dnf install -y zabbix-agent

Now start the service and make it start with system boot.

systemctl enable --now zabbix-agent

Zabbix agent configuration

Open the Zabbix configuration file.

nano /etc/zabbix/zabbix_agentd.conf

Find and set the correct values for the next parameters:


The first two of them must contain the IP address of the Zabbix server, and the Hostname is the name of this client that will be displayed in statistics on the server.

systemctl restart zabbix-agent

Firewall configuration

Open the 10050, 10051, http,https ports for Zabbix to work.

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

And now restart Firewall

systemctl restart firewalld

Warning: file_get_contents([YOUR SITE URL]): failed to open stream: Connection refused in /var/www/vhosts/ on line 821