• Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us
TecAdmin
Menu
  • Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us

How to Install Zabbix Agent on CentOS/RHEL 7/6

Written by Rahul, Updated on September 10, 2019

Zabbix Agent is required to install on all remote systems needs to be monitor through Zabbix server. The Zabbix Agent collects resource utilization data and applications data on the client system and provides such information to the Zabbix server on their requests.

There are two types of checks between Zabbix Server and Client.

  • Passive Check – Zabbix Agent sent data to server on their request.
  • Active Check – Zabbix Agent sends data periodically to server.

After installing zabbix server on your server, Now we are moving to install agent on remote system’s. This article will help you to install zabbix agent on CentOS/RHEL 7/6/5 systems. After completing this step go to next article add Host in Zabbix Server.

Step 1 – Add Required Repository

Before installing Zabbix Agent first configure Zabbix yum repository using following commands as per your required version and operating system.

CentOS/RHEL 7:
rpm -Uvh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-2.el7.noarch.rpm

CentOS/RHEL 6:
rpm -Uvh https://repo.zabbix.com/zabbix/4.0/rhel/6/x86_64/zabbix-release-4.0-2.el6.noarch.rpm

Step 2 – Install Zabbix Agent

After installing yum repository packages in our system. Use the following command to install Zabbix agent on your CentOS and Red Hat systems using the yum package manager.

yum install zabbix zabbix-agent

Step 3 – Zabbix Agent Configuration

As Zabbix agent has been successfully installed on our remote system. Now we just need to configure Zabbix agent by adding Zabbix server IP to the configuration file /etc/zabbix/zabbix_agentd.conf

#Server=[zabbix server ip]
#Hostname=[ Hostname of client system ]

Server=192.168.1.100
Hostname=Server1

Step 4 – Open Port

Zabbix agent uses 10050/tcp port. You are required to open this port to allow the Zabbix server with the agent. Execute command to open port in iptables firewall where 192.168.1.100 is IP of Zabbix server.

iptables -A INPUT -p tcp -s 192.168.1.100 --dport 10050 -m state --state NEW,ESTABLISHED -j ACCEPT

Step 5 – Restarting Zabbix Agent

After adding Zabbix server IP to the configuration file, now restart agent service to reload the new settings, using the following command.

service zabbix-agent restart

To start and stop zabbix-agent service anytime use following commands.

service zabbix-agent start
service zabbix-agent stop

Congratulation’s! You have successfully installed Zabbix Agent. Lets add host in zabbix server to be monitory.

Share it!
Share on Facebook
Share on Twitter
Share on LinkedIn
Share on Reddit
Share on Tumblr
Share on Whatsapp
Rahul
Rahul
Connect on Facebook Connect on Twitter

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

21 Comments

  1. Avatar Gimmy Reply
    July 24, 2020 at 8:31 am

    Hello, When i start zabbix server, im getting Failed to start zabbix-server.service: Unit not found..

    I have installed everything, but its not coming up.

  2. Avatar zenitsu Reply
    September 20, 2019 at 8:33 pm

    Hello Sir, I am new to linux and I tried installing zabbix for my server by following the tutorial on this site. I was able to install it however I am having problems installing zabbix-agent for my client. I ran the command to add the repository and install zabbix and zabbix-agent but I got the results below. I can see that there was a conflict between zabbix and zabbix-agent but not sure how to resolve.

    Dependencies Resolved

    ======================================================================================
    Package Arch Version Repository Size
    ======================================================================================
    Installing:
    zabbix-agent x86_64 4.0.12-1.el7 zabbix 412 k
    zabbix40 x86_64 4.0.11-1.el7 epel 348 k

    Transaction Summary
    ======================================================================================
    Install 2 Packages

    Total size: 760 k
    Total download size: 412 k
    Installed size: 3.0 M
    Downloading packages:
    zabbix-agent-4.0.12-1.el7.x86_64.rpm | 412 kB 00:00:01
    Running transaction check
    Running transaction test

    Transaction check error:
    file /etc/zabbix/zabbix_agentd.conf conflicts between attempted installs of zabbix40-4.0.11-1.el7.x86_64 and zabbix-agent-4.0.12-1.el7.x86_64

    Error Summary
    ————-

  3. Avatar blumingu Reply
    April 18, 2019 at 6:46 pm

    Merci d’avoir écrit cet article. Cela a beaucoup aidé

  4. Avatar Ricardo Reply
    April 23, 2018 at 7:15 pm

    Hi, very good and simple explanation on how to install and setup zabbix agent on CentOS/RHEL, but, here I’m trying to install the agent on my CentOS 7.2, but it isn’t going as simple as you describe.
    See:
    I run:
    # rpm -Uvh http://repo.zabbix.com/zabbix/3.5/rhel/7/x86_64/zabbix-release-3.5-1.el7.noarch.rpm
    Retrieving http://repo.zabbix.com/zabbix/3.5/rhel/7/x86_64/zabbix-release-3.5-1.el7.noarch.rpm
    warning: /var/tmp/rpm-tmp.llfFqY: Header V4 RSA/SHA512 Signature, key ID a14fe591: NOKEY
    Preparing… ################################# [100%]
    Updating / installing…
    1:zabbix-release-3.5-1.el7 ################################# [100%]

    Everything ok, but:
    # yum repolist
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * base: http://ftp.unicamp.br
    * epel: mirror.uta.edu.ec
    * extras: http://ftp.unicamp.br
    * updates: http://ftp.unicamp.br
    repo id repo name status
    base/7/x86_64 CentOS-7 – Base 0+9,591
    epel/x86_64 Extra Packages for Enterprise Linux 7 – x86_64 0+12,507
    extras/7/x86_64 CentOS-7 – Extras 0+448
    updates/7/x86_64 CentOS-7 – Updates 0+2,416
    zabbix/x86_64 Zabbix Official Repository – x86_64 0+248
    zabbix-non-supported/x86_64 Zabbix Official Repository non-supported – x86_64 0+4
    repolist: 0

    And,:
    # yum install zabbix-agent
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * base: http://ftp.unicamp.br
    * epel: mirror.uta.edu.ec
    * extras: http://ftp.unicamp.br
    * updates: http://ftp.unicamp.br
    No package zabbix-agent available.
    Error: Nothing to do

    What I’m doing wrong?

  5. Avatar Mandar U Reply
    April 23, 2018 at 11:22 am

    Firstly thanks for the great and simple steps to configure the zabbix.
    my issues zabbix agent is running but i am not able to use it i tried to access it using
    127.0.0.1:10050/zabbix
    localhost:/10050/zabbix

    getting this page is not

    Please help.

  6. Avatar Jeroen Reply
    April 25, 2017 at 1:58 pm

    At REHL 7/CentOS 7, /etc/init.d/zabbix-agent start is old dated and not available anymore

    use
    systemctl restart zabbix-agent

    and to auto-start it after a reboot
    systemctl enable zabbix-agent

    If you use incoming connections open the firewall…

  7. Avatar mcklou Reply
    April 3, 2017 at 6:48 am

    hi guys can you help with my agent. i cant edit my config file for “agent” (access denied for super user)

  8. Avatar tiago Reply
    October 4, 2016 at 1:41 pm

    Thanks! Great Job!

  9. Avatar Paulinux Reply
    July 3, 2016 at 3:45 am

    Thanks, very nice !!!

  10. Avatar Raqeeb Reply
    February 7, 2016 at 6:00 pm

    Hi,

    I want to install zabbix agent without opening the port 10050.please help

  11. Avatar Raqeeb Reply
    February 6, 2016 at 7:18 pm

    Hi,

    I want to install Zabbix agent without opening the port 10050.Is it possible to install if it so please help me to install the zabbix agent.And also please give me a tutorials on this

    • Avatar IT Secure Reply
      June 14, 2016 at 2:50 pm

      You can use zabbix agent in active mode so you do not need open the port. You have to give the zabbix server ip on filed ServerActive=
      On that case, you have to make sure that on zabbix server side, you have to open the 10051 port.

      Hope that help.

  12. Avatar Alex Lima Reply
    January 4, 2016 at 4:48 pm

    Hi,

    Is it possible to install Zabbix Agent as non root user?
    e.g. install as zabbix.

    I don’t have access to root on many of my servers and it would be hard to get the SA to approve that.

    Thanks,
    Alex

    • Avatar Siranjeevi Reply
      January 6, 2017 at 10:00 am

      Nope! It is not possible install as standard user.

  13. Avatar Bixente Wiltord Reply
    October 3, 2015 at 3:24 pm

    This is a great article. I have a Ubuntu 14.04 server and using your tutorial and combining with another I managed to successfully install Zabbix and configure a Zabbix agent.
    Kudos to you and many thanks.

  14. Avatar Wellington Torrejais da Silva Reply
    December 9, 2014 at 11:10 am

    Thanks, very much.

  15. Avatar Kim Reply
    April 9, 2014 at 12:57 pm

    How to Uninstall zabbix completely from Centos?

  16. Avatar Ryan Reply
    January 13, 2014 at 9:12 am

    Hi, can you update your post? URL are changed and I am getting the error as below once i ran command.
    # rpm -Uvh zabbix-agent-2.2.0-1.el6.x86_64.rpm
    error: Failed dependencies:
    zabbix = 2.2.0-1.el6 is needed by zabbix-agent-2.2.0-1.el6.x86_64

    I am new to linux and zabbix. Please help me. Thank you.

    • Rahul Rahul Kumar Reply
      January 13, 2014 at 10:06 am

      Thanks Ryan. We will update articles soon.

      You need to install first new zabbix yum repositories package then install zabbix agent

      # rpm -ivh http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2-1.el6.noarch.rpm
      # yum install zabbix-agent

      I hope this will help you

  17. Avatar Ramos Reply
    January 11, 2014 at 10:53 am

    Hi,

    Thanks for this article and its very useful ……And I had implemented this in my machine and installed successfully…..But the problem is Mysql related applications and triggers are not working………..I had checked my version of server and agent….both are same zabbix-xxxxx-xxxxx-2.2.1-1
    …
    …
    If you know the solution please update it as a link or reply to this………

    • Avatar boris b Reply
      June 9, 2014 at 12:24 pm

      Hm…
      Sometimes it happens that mysql write/read speed is just not fast enough so it can’t be writen inside mysql db. This can cause slow response time of zabbix! You can try to tune mysql ,tune i/o operations on server or add more hardware resourses!

Leave a Reply Cancel reply

Popular Posts

  • How To Install Python 3.9 on Ubuntu 20.04 5
  • How to Install Python 3.9 on CentOS/RHEL 7 & Fedora 32/31 0
  • How To Install VNC Server on Ubuntu 20.04 1
  • How To Install NVM on macOS with Homebrew 0
  • How to Install .NET Core on Debian 10 0
© 2013-2020 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy