一、zabbix服务端信息
系统版本:Centos 7.4
IP地址:192.168.62.131
二、zabbix客户端信息
系统版本:redhat 7
IP地址: 192.168.62.143
三、zabbix客户端配置
[root@localhost ~]# vim /etc/selinux/config
# 修改成SELINUX=disabled 永久关闭Selinux安全策略
[root@localhost ~]# setenforce 0
[root@localhost ~]# systemctl disable firewalld.service
[root@localhost ~]# systemctl stop firewalld.service
# 关闭防火墙
[root@localhost ~]# reboot
# 重启系统
[root@localhost ~]# yum -y install epel-release
# 安装epel扩展源
[root@localhost ~]# wget https://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
#下载zabbix的yum源
[root@localhost ~]# rpm -ivh zabbix-release-3.2-1.el7.noarch.rpm
#安装下载的包
[root@localhost ~]# yum repolist
# 刷新系统的yum源仓库
[root@localhost ~]# yum -y install zabbix-agent
# 安装zabbix-agent 代理,客户端只需要安装这一个就够了
[root@localhost ~]# vim /etc/zabbix/zabbix_agentd.conf
#修改配置参数
1、定义服务端IP(被动模式):即监控中心过来采集数据
把Server=127.0.0.1修改为Server=192.168.62.131(服务端ip地址)
zabbix server 地址,可以多个,用逗号”,”隔开
2、定义服务端IP(主动模式):主动向监控中心上传数据
把ServerActive=127.0.0.1修改为ServerActive=192.168.62.131(服务端ip地址)
3、修改主机名,令服务端识别数据是从哪台机器采集过来的 这个与客户端的主机名一致,注意区分大小写
把Hostname=Zabbix server修改为Hostname=redhat 7
[root@zyshanlinux-02 ~]# systemctl start zabbix-agent
#修改完配置需要重启zabbix-agent服务
[root@localhost ~]# cat /etc/services |grep zabbix
# 查看zabbix服务占用的端口号
[root@localhost ~]# systemctl start zabbix-agent
# 启动zabbix客户端
[root@localhost ~]# systemctl enable zabbix-agent
#开机启动,添加进启动列表里面去
[root@localhost ~]# service zabbix-agent status
#查看Zabbix-Agent服务运行状态
四、zabbix服务端配置
# 创建一个主机
# 填完新主机信息,然后添加 模板
# 点击 更新
#添加成功
# 数据就出来了,说明正常运行
五、结束
至此客户端的配置已经完成!