1.Zabbix Agent 安装
Zabbix 5.0 LTS
# rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
# yum clean all
# yum install -y zabbix-agent
Zabbix 4.0 LTS
# rpm -Uvh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-2.el7.noarch.rpm
# yum clean all
# yum install -y zabbix-agent
Zabbix 3.0 LTS
# rpm -Uvh https://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
# yum clean all
# yum install -y zabbix-agent
2. 安装完成后配置文件一般在 /etc/zabbix/zabbix_agentd.conf,打开把里面内容全部清空然后加入
PidFile=/var/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log #错误日志
LogFileSize=0
ListenPort=10050 #启动监听端口
StartAgents=3 #被动模式下选择,主动模式则为0
ListenIP=0.0.0.0 #监听所有IP
Server=10.27.146.250 #被动模式下必填,将zabbix-server端的ip填入
#ServerActive=10.27.146.250 #主动模式下填写
Hostname=Api1Bearead #本机的hostname,此值必须与zabbix的网页上创建的主机名一致即可
Include=/etc/zabbix/zabbix_agentd.d/