How to Install Zabbix Agent on CentOS 8/7, Ubuntu 20.04 & Debian 11/10

0

In the previous article, you have seen how to install Zabbix Server on CentOS, Ubuntu, and Debian operating systems.

READ: How To Install Zabbix Server on CentOS 8 / RHEL 8

READ: How To Install Zabbix Server on CentOS 7 / RHEL 7

READ: How To Install Zabbix Server on Ubuntu 20.04 / 18.04

READ: How To Install Zabbix Server on Debian 11 / Debian 10

In continuation to that, we will now see how to install the Zabbix Agent on the remote machine to monitor it.

Add Zabbix Agent Repository

Zabbix Agent is not available in the base repository, and to obtain it, you will need to install the Zabbix repository configuration package on the remote system.

### CentOS 8 / RHEL 8 ###

rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/8/x86_64/zabbix-release-5.0-1.el8.noarch.rpm

### CentOS 7 / RHEL 7 ###

rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm

### Ubuntu 20.04 ###

wget https://repo.zabbix.com/zabbix/5.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.0-1+focal_all.deb
sudo dpkg -i zabbix-release_5.0-1+focal_all.deb
sudo apt update

### Debian 11 ###

wget https://repo.zabbix.com/zabbix/5.0/debian/pool/main/z/zabbix-release/zabbix-release_5.0-2+debian11_all.deb
sudo dpkg -i zabbix-release_5.0-2+debian11_all.deb
sudo apt update

### Debian 10 ###

wget https://repo.zabbix.com/zabbix/5.0/debian/pool/main/z/zabbix-release/zabbix-release_5.0-1+buster_all.deb
sudo dpkg -i zabbix-release_5.0-1+buster_all.deb
sudo apt update

Install Zabbix Agent

Once you have configured the Zabbix repository on your machine, install the Zabbix Agent using the following command.

### CentOS 8/7 & RHEL 8/7 ###

dnf install -y zabbix-agent

### Ubuntu 20.04 & Debian 11/10 ###

sudo apt install -y zabbix-agent

Configure Zabbix Agent

Edit the Zabbix agent file to specify the Zabbix Server details.

### CentOS 8/7 & RHEL 8/7 ###

vi /etc/zabbix/zabbix_agentd.conf

### Ubuntu 20.04 & Debian 11/10 ###

sudo nano /etc/zabbix/zabbix_agentd.conf

Update the following details on the Zabbix agent file.

### Zabbix Server IP Address or Hostname ###

Server=server.itzgeek.local

### Client Hostname ###

Hostname=node1.itzgeek.local

Restart the Zabbix agent server after updating the Zabbix server information.

### CentOS 8/7 & RHEL 8/7 ###

systemctl restart zabbix-agent

### Ubuntu 20.04 & Debian 11/10 ###

sudo systemctl restart zabbix-agent

Enable the Zabbix agent to start automatically on system boot.

### CentOS 8/7 & RHEL 8/7 ###

systemctl enable zabbix-agent

### Ubuntu 20.04 & Debian 11/10 ###

sudo systemctl enable zabbix-agent

Conclusion

That’s All. Now you can head to add a remote system to Zabbix Server for monitoring.

You might also like