Installing and updating Zabbix-agent on CentOS 7
Installing zabbix-agent
Add Zabbix repository (version 3.2)
[[email protected]]# rpm -ivh https://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
Updating
[[email protected]]# yum update
Install zabbix-agent:
[[email protected]]# yum install zabbix-agent
Editing the configuration file:
[[email protected]]# nano /etc/zabbix/zabbix_agentd.conf
We register the ip-address of the zabbix server and the name of our machine, which we will monitor
Server=192.168.1.37
Hostname=srv-serv-01
Firewall configuration:
[[email protected]]# firewall-cmd --permanent --new-service=zabbix
[[email protected]]# firewall-cmd --permanent --service=zabbix --add-port=10050/tcp
[[email protected]]# firewall-cmd --permanent --service=zabbix --set-short="Zabbix Agent"
[[email protected]]# firewall-cmd --permanent --add-service=zabbix
Restart the firewall:
[[email protected]]# firewall-cmd --reload
Add zabbix-agent to startup, launch it and check the status
[[email protected]]# systemctl enable zabbix-agent
[[email protected]]# systemctl start zabbix-agent
[[email protected]]# systemctl status zabbix-agent
Zabbix-agent update
We update zabbix-agent from version 3.4 to version 3.4
[[email protected]]# rpm -Uvh https://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
Загружается https://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
Подготовка... ################################# [100%]
Обновление / установка...
1:zabbix-release-3.4-2.el7 ################################# [ 50%]
Очистка / удаление...
2:zabbix-release-3.2-1.el7 ################################# [100%]
Updating
[[email protected]]# yum update