centos7zabbix-agen安装

时间:2023-02-04 15:08:18

安装包下载地址:http://www.zabbix.com/download.php

下载对应rpm包     http://repo.zabbix.com/zabbix/

wget http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-agent-3.2.6-1.el7.x86_64.rpm
rpm -ivh zabbix-agent-3.2.6-1.el7.x86_64.rpm

zabbix主动模式常用命令

sed -ri 's/^Server=(.*)/Server=172.31.209.59/' /etc/zabbix/zabbix_agentd.conf
sed -ri 's/^ServerActive=(.*)/ServerActive=172.31.209.59/' /etc/zabbix/zabbix_agentd.conf
sed -ri '/# StartAgents=3/a\StartAgents=0' /etc/zabbix/zabbix_agentd.conf
sed -ri "s/^Hostname=(.*)/Hostname=$(hostname)/" /etc/zabbix/zabbix_agentd.conf
egrep '^Server|^ServerActive|^Hostname|^StartAgents' /etc/zabbix/zabbix_agentd.conf
systemctl start zabbix-agent.service #Server=172.31.209.59
#StartAgents=0
#ServerActive=172.31.209.59
#Hostname=iZ23kkr0sgyZ