[root@apache src]# scp zabbix-5.4.4.tar.gz 192.168.47.129:/usr/src The authenticity of host '192.168.47.129 (192.168.47.129)' can't be established. ECDSA key fingerprint is SHA256:arjro5l4gzHMMPqCWgCdQ5KCISdUB4TzgxUomu/4t2U. Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added '192.168.47.129' (ECDSA) to the list of known hosts. root@192.168.47.129's password: zabbix-5.4.4.tar.gz 100% 23MB 105.1MB/s 00:00 [root@php ~]# cd /usr/src/ [root@php src]# ls debug kernels zabbix-5.4.4.tar.gz [root@php src]# tar xf zabbix-5.4.4.tar.gz [root@php src]# useradd -r -M -s /sbin/nologin zabbix [root@php ~]# yum -y install vim wget gcc gcc-c++ make pcre-devel openssl openssl-devel [root@php src]# cd zabbix-5.4.4/ [root@php zabbix-5.4.4]# ./configure --enable-agent [root@php zabbix-5.4.4]# make install在客户端配置文件中配置服务端的地址和主机名
[root@php zabbix-5.4.4]# vim /usr/local/etc/zabbix_agentd.conf Server=192.168.47.128 #113行 ServerActive=192.168.47.128 #154行 Hostname=tanjie #165行 生产环境建议使用随机生成的字符串启动agent
[root@php ~]# ss -anlit
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 0.0.0.0:10050 0.0.0.0:*
cubic cwnd:10
LISTEN 0 128 0.0.0.0:111 0.0.0.0:*
cubic cwnd:10
LISTEN 0 32 192.168.122.1:53 0.0.0.0:*
cubic cwnd:10
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
在web界面上添加主机/主机组
模板添加监控项
此处为绿色表示正常对其监控
验证网络是否互通
[root@apache ~]# ping 192.168.47.130 PING 192.168.47.130 (192.168.47.130) 56(84) bytes of data. 64 bytes from 192.168.47.130: icmp_seq=1 ttl=128 time=0.326 ms 64 bytes from 192.168.47.130: icmp_seq=2 ttl=128 time=0.530 ms 64 bytes from 192.168.47.130: icmp_seq=3 ttl=128 time=0.524 ms 64 bytes from 192.168.47.130: icmp_seq=4 ttl=128 time=0.309 ms ^C --- 192.168.47.130 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 58ms rtt min/avg/max/mdev = 0.309/0.422/0.530/0.105 ms [root@apache ~]#下载安装包
-c :指定配置文件所有位置
-i :安装客户端
-s :启动客户端
-x :停止客户端
-d :卸载客户端
指定主机名和ip地址
添加模块
结果



