Hamsa K
Editor
4 min read | 3 years ago

How to Install Zabbix Agent on Centos 7

How to Install Zabbix Agent on Centos 7

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

Step 1: Add zabbix agent repository

first we will configure Zabbix yum repository using following commands as per your required version and operating system.

##################### Centos 7 ###################################################
rpm -ivh http://repo.zabbix.com/zabbix/4.3/rhel/7/x86_64/zabbix-release-4.3-3.el7.noarch.rpm
###################### Centos 6 ###################################################
rpm -ivh http://repo.zabbix.com/zabbix/4.3/rhel/6/x86_64/zabbix-release-4.3-3.el6.noarch.rpm
###################### Ubuntu 18.04 ###############################################
wget http://repo.zabbix.com/zabbix/4.3/ubuntu/pool/main/z/zabbix-release/zabbix-release_4.3-1%2Bbionic_all.deb
dpkg -i zabbix-release_4.3-1+bionic_all.deb
apt update

Step 2: Install zabbix Agent

you can use below commands to install zabbix agent on centos and ubuntu systems.

### 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

We hope you are following "How to Install Zabbix Agent on Centos 7" step by step carefully. The remaining steps will help you to finish the upgrade process..

Step 3: 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.

Server=192.168.0.13
ServerActive=192.168.0.13
Hostname=node2

Note:

Server=IP of Zabbix Server

ServerActive=IP of Zabbix Server

Hostname=use the FQDN of the system where the agent runs

systemctl restart zabbix-agent

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

The Zabbix agent is installed and running on CentOS 7 host.Now we will add host to zabbix server

Also Read -> How to Install and Configure Zabbix on Centos 7

Step 4:Add host to zabbix server

Login to Zabbix server and navigate to configuration--Hosts--Create host to add your host system.you can enter host name,visible name and Groups and ip address etc.

Now configure host template. Click on Templates and goto 'Link new templates'

and choose Template OS Linux and click add button to add new template.

Next, Add the host to Zabbix server. Then it displays like below.

centos 7 host was added to zabbix server for monitoring.Now check data and graphs.

That's it. you have learned how to install and configure zabbix host and adding it to zabbix server.

 


Warning! This site uses cookies
By continuing to browse the site, you are agreeing to our use of cookies. Read our terms and privacy policy