1.监控本机
#启动zabbix-server端的客户端
[root@zabbix-server ~]# systemctl start zabbix-agent.service
[root@zabbix-server ~]# systemctl enable zabbix-agent.service
Created symlink from /etc/systemd/system/multi-user.target.wants/zabbix-agent.service to /usr/lib/systemd/system/zabbix-agent.service.
2.监控zabbix客户端
#安装zabbix客户端
[root@web01 ~]# yum install -y https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/4.0/rhel/7/x86_64/zabbix-agent-4.0.20-1.el7.x86_64.rpm
#编辑配置文件
[root@web01 ~]# vim /etc/zabbix/zabbix_agentd.conf
Server=172.16.1.71
#启动zabbix-agent
[root@web01 ~]# systemctl restart zabbix-agent
[root@web01 ~]# systemctl enable zabbix-agent
[root@web01 ~]# netstat -lntp | grep zabbix
tcp 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN 7059/zabbix_agentd
tcp6 0 0 :::10050 :::* LISTEN 7059/zabbix_agentd