部署zabbixagent脚本
#!/bin/bash
#clsn
#设置解析
#安装zabbix源、aliyu nYUM源
rpm -ivh http://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
yum clean all
yum makecache
#安装zabbix客户端
yum install zabbix-agent -y
sed -i.ori 's#Server=127.0.0.1#Server=192.168.1.199#' /etc/zabbix/zabbix_agentd.conf
systemctl start zabbix-agent.service
#写入开机自启动
systemctl start zabbix-agent.service
systemctl enable zabbix-agent.service