Zabbix agent升级脚本

Zabbix agent升级脚本

Scroll Down
#!/bin/bash
systemctl stop zabbix-agent
rpm -qa |grep zabbix |xargs rpm -e
rpm -Uvh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-2.el7.noarch.rpm
yum install zabbix-agent -y
sed -i 's/ServerActive=127.0.0.1/ServerActive=192.168.200.173/g' /etc/zabbix/zabbix_agentd.conf  && sed -i 's/Server=127.0.0.1/Server=192.168.200.173/g' /etc/zabbix/zabbix_agentd.conf
systemctl start zabbix-agent && systemctl status zabbix-agent