zabbix_agent的配置流程
centos主机上配置
在客户端上安装zabbix_agentd
[root@server ~]# scp zabbix-5.2.6.tar.gz 192.168.247.211:/root/
[email protected]'s password:
zabbix-5.2.6.tar.gz 100% 20MB 101.2MB/s 00:00
[root@client ~]# tar xf zabbix-5.2.6.tar.gz
[root@client ~]# cd zabbix-5.2.6
[root@client zabbix-5.2.6]# useradd -r -M -s /sbin/nologin zabbix
[root@client zabbix-5.2.6]# ./configure --enable-agent
[root@client zabbix-5.2.6]# make install
在客户端配置文件中配置服务端的地址和主机名
[root@client etc]# vim /usr/local/etc/zabbix_agentd.conf
……
Server=192.168.247.215
ServerActive=192.168.247.215
Hostname=test2 //生产环境建议使用随机生成的字符串
……
启动agent
[root@client ~]# zabbix_agentd
[root@client ~]# ss -anlt
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 128 0.0.0.0:9000 0.0.0.0:*
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 128 0.0.0.0:10050 0.0.0.0:*
LISTEN 0 128 [::]:22 [::]:*