How To Install Zabbix Agent on CentOS 7 / Ubuntu 18.04/16.04 & Debian 9/8

0
Install Zabbix Agent on CentOS 7
Install Zabbix Agent on CentOS 7

In the previous article, I showed you how to install Zabbix Server on CentOS 7 / Ubuntu 18.04 / Debian 9.

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

READ: How To Install Zabbix Server 3.4 on Ubuntu 18.04 / Ubuntu 16.04 / Debian 9

In continuation to that, I will now install Zabbix client package zabbix-agent on client machines to monitor them.

Zabbix Agent collects the data from the client machine such as resource statistics, application data, etc.. and sends them to Zabbix Server.

Add Zabbix Agent repository

Log in as root or switch to the root user.

sudo su -

OR

su -

zabbix-agent is not available in the base repository. To obtain zabbix-agent package, you would need to install Zabbix repository configuration package on the client system.

### CentOS 7 / RHEL 7 ###

rpm -ivh https://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm

### CentOS 6 / RHEL 6 ###

rpm -ivh https://repo.zabbix.com/zabbix/3.4/rhel/6/x86_64/zabbix-release-3.4-1.el6.noarch.rpm 

### Ubuntu 18.04 ###

wget https://repo.zabbix.com/zabbix/3.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.4-1+bionic_all.deb
dpkg -i zabbix-release_3.4-1+bionic_all.deb
apt update 

### Ubuntu 16.04 ###

wget https://repo.zabbix.com/zabbix/3.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.4-1+xenial_all.deb
dpkg -i zabbix-release_3.4-1+xenial_all.deb
apt-get update 

### Debian 9 ###

wget https://repo.zabbix.com/zabbix/3.4/debian/pool/main/z/zabbix-release/zabbix-release_3.4-1+stretch_all.deb
dpkg -i zabbix-release_3.4-1+stretch_all.deb
apt update

### Debian 8 ###

wget https://repo.zabbix.com/zabbix/3.4/debian/pool/main/z/zabbix-release/zabbix-release_3.4-1+jessie_all.deb
dpkg -i zabbix-release_3.4-1+jessie_all.deb
apt-get update

Install Zabbix Agent

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

### CentOS 7/6 & RHEL 7/6 ###

yum install -y zabbix-agent

### Ubuntu 18.04 / 16.04 & Debian 9/8 ###

apt-get install -y zabbix-agent

Configure Zabbix Agent

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

vi /etc/zabbix/zabbix_agentd.conf

Update the following details on the Zabbix agent file.

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

Server=ubuntu.itzgeek.local

### Client Hostname ###

Hostname=centos.itzgeek.local

Control Zabbix Agent

Run the following command to restart the Zabbix agent.

service zabbix-agent restart

Enable zabbix-agent to start automatically on system boot.

### CentOS 7 / RHEL 7 / Ubuntu 18.04 / Debian 9 ###

systemctl enable zabbix-agent

### CentOS 6 / RHEL 6 ###

chkconfig zabbix-agent on

### Ubuntu 16.04 / Debian 8 ###

update-rc.d zabbix-agent enable

What Next

READ: How To Add a Node to Zabbix Server for monitoring

That’s All.

Further Reading

You might also like

How To Install Zabbix Agent on CentOS 7 / Ubuntu 18.04/16.04 & Debian 9/8

0