How To Install and Configure Zabbix Agent on Linux – Red Hat Enterprise Linux / CentOS and Debian / Ubuntu
Zabbix server requires to install Zabbix Agent on remote Windows and Linux systems. For collecting information and and provide to Zabbix. Install and Configure Zabbix Agent on Linux very easy and takes about 5 min.
Before install Zabbix agent on Linux we need install correct repository.
In case if you have RHEL 5 and RHEL 6 agent are available for download from http://repo.zabbix.com/zabbix/
Install Zabbix Agent on Red Hat Enterprise Linux CentOS
To install Zabbix agent on RHEL 7 first install repository configuration package, then install install and start Zabbix agent:
# rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
# yum install zabbix-agent # systemctl start zabbix-agent
For RHEL5, RHEL6:
# rpm -Uvh http://repo.zabbix.com/zabbix/3.4/rhel/6/i386/zabbix-agent-3.4.0-1.el6.i686.rpm # chkconfig zabbix-agent on
Open Firewall Port
For functioning Zabbix agent uses Port TCP 10050. If your system is behind a firewall you need to open 10050/tcp.
Next command will open port TCP/10050 for server 10.110.5.100
# iptables -A INPUT -p tcp -s 10.250.0.80 --dport 10050 -m state --state NEW,ESTABLISHED -m comment --comment "Zabbiz Agent" -j ACCEPT # iptables-save > /etc/sysconfig/iptables
Configure Zabbix Agent
After Zabbix agent installation in remote system we need add Zabbix server IP in configuration file. Edit file: zabbix_agentd.conf.
# vi /etc/zabbix/zabbix_agentd.conf
Then add Zabbix server/proxy IP address:
Server=10.110.5.100 Hostname=Server1
And restart Zabbix agent:
service zabbix-agent restart
Install Zabbix Agent on Debian / Ubuntu
To install Zabbix agent on Debian 7,8,9 install the repository configuration package and apt:
# wget http://repo.zabbix.com/zabbix/3.2/debian/pool/main/z/zabbix-release/zabbix-release_3.2-1+stretch_all.deb # dpkg -i zabbix-release_3.2-1+stretch_all.deb # apt-get update
For Ubuntu 16.04 LTS, 14.04 LTS:
# wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb # dpkg -i zabbix-release_3.2-1+xenial_all.deb # apt-get update
For Ubuntu 14.04 LTS change ‘xenial’ to ‘trusty’.
Open Firewall Port
For functioning Zabbix agent uses Port TCP 10050. If your system is behind a firewall you need to open 10050/tcp.
Next command will open port TCP/10050 for server 10.110.5.100
# iptables -A INPUT -p tcp -s 10.250.0.80 --dport 10050 -m state --state NEW,ESTABLISHED -m comment --comment "Zabbiz Agent" -j ACCEPT # iptables-save > /etc/sysconfig/iptables
Configure Zabbix Agent
After Zabbix agent installation in remote system we need add Zabbix server IP in configuration file. Edit file: zabbix_agentd.conf.
# vi /etc/zabbix/zabbix_agentd.conf
Then add Zabbix server/proxy IP address:
Server=10.110.5.100 Hostname=Server1
And restart Zabbix agent:
service zabbix-agent restart