Installing and configuring Zabbix agent on CentOS/RHEL

Before installation, let’s see the version of the system:

lsb_release -a

I have CentOS version 6.8 X64, remotely at that moment there was a Zabbix server version 3.0.7, so I picked up version 3.0 at (there is a newer one, for example 3.1, 3.2, etc. d.).
Add the source:

rpm -Uvh

For CentOS/RHEL 7 another link:

rpm -Uvh

For CentOS/RHEL 5:

rpm -Uvh

Now execute the command to install the Zabbix agent:

yum install zabbix zabbix-agent

After installation, edit the configuration file, for example, with the nano editor (in which Ctrl+X for exiting, y/n and Enter for saving or canceling the changes):

nano /etc/zabbix/zabbix_agentd.conf

Namely, we indicate:
Server = (ip address of the remote Zabbix server)
ServerActive = (ip address of the remote Zabbix server)
Hostname = name for active checks, the same as specified in the Zabbix server for this host, you can see the system command hostname

After editing, apply the changes by restarting the Zabbix agent:

/etc/init.d/zabbix-agent restart

You can stop/start it with the commands:

/etc/init.d/zabbix-agent stop
/etc/init.d/zabbix-agent start

For autostart in Centos7/RHEL7, do:

systemctl enable zabbix-agent.service

In Centos6/RHEL6:

chkconfig zabbix-agent on

See also my article:
Install and configure Zabbix agent in Ubuntu

Leave a comment

Leave a Reply