1、rpm -Uvh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-2.el7.noarch.rpm #設置客戶端源
2、yum -y install zabbix-agent #安裝客戶端
3、sed -i "s#Server=127.0.0.1#Server=192.168.0.236/24#g" /etc/zabbix/zabbix_agentd.conf #設置服務地址
sed -i "s#ServerActive=127.0.0.1#ServerActive=192.168.0.236/24#g" /etc/zabbix/zabbix_agentd.conf #ServerActive指定Agentd收集的數據往哪里發送
sed -i "s#Hostname=Zabbix server#Hostname=192.168.0.237#g" /etc/zabbix/zabbix_agentd.conf #設置客戶端地址
egrep -v "^#|^$" /etc/zabbix/zabbix_agentd.conf #查看設置
systemctl restart zabbix-agent #啟動zabbix-agent客戶端
systemctl enable zabbix-agent #設置zabbix-agent客戶端開機啟動