解压缩
tar zxvf zabbix-4.2.3.tar.gz
cd zabbix-4.2.3
编译目录可自定义
./configure --prefix=/data/service/apps/zabbix --enable-agent
make
make install
启动
执行 /data/service/apps/zabbix/sbin/zabbix_agentd
修改配置文件 /data/service/apps/zabbix/etc/zabbix_agentd.conf
EnableRemoteCommands=1
Hostname=172.x.x.x #客户端ip地址 zabbix界面“主机名称”的配置,需要与此处完全一致,否则不能通信。
ListenPort=10050
LogFile=/tmp/zabbix_agentd.log
LogRemoteCommands=0
Server=172.x.x.x #服务端ip地址
ServerActive=172.x.x.x #服务端ip地址
停止
#ps -ef|grep agentd 找下主进程,或者pid文件里的pid
kill -15 进程id