[root@zabbix2 ~]# curl -o /etc/yum.repos.d/epel.repos http://mirrors.aliyun.com/repo/epel-7.repo
[root@zabbix2 ~]# curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
[root@zabbix2 ~]# rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
Zabbix5.0 YUM源切换到阿里
[root@zabbix2 ~]# vim /etc/yum.repos.d/zabbix.repo
%s#repo.zabbix.com#mirrors.aliyun.com/zabbix#g
[root@zabbix2 ~]# yum clean all
[root@zabbix2 ~]# yum makecache
[root@zabbix2 ~]# yum install zabbix-agent -y
[root@zabbix2 ~]# vim /etc/zabbix/zabbix_agentd.conf
PidFile=/var/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log
DebugLevel=3
Server=192.168.161.200
ListenPort=10050
ListenIP=192.168.161.201
ServerActive=192.168.161.200
Hostname=192.168.161.201
Include=/etc/zabbix/zabbix_agentd.d/*.conf
# UserParameter
说明:
PidFile
:PidLogFile
:日志文件DebugLevel
:日志级别Server
:zabbix server 的地址ListenPort
:nginx的地址 默认10050ListenIP
:自己的ipServerActive
:主动将自己的作业给到server 的ipHostname
:agent的主机名/ipInclude
:包含的配置文件
[root@zabbix1 ~]# yum list all | grep zabbix
[root@zabbix1 ~]# yum install zabbix-get.x86_64
# 在 zabbix 服务器端检查
[root@zabbix1 ~]# zabbix_get -s 192.168.161.201 -p10050 -k "system.hostname"
zabbix2
[root@zabbix1 ~]# zabbix_get -s 192.168.161.201 -p 10050 -k "system.cpu.load"
0.040000