zabbix-agent主动模式的安装和配置

1.安装zabbix-agent
1.1关闭SELinux(selinux是一个安全系统,为了避免麻烦需要关闭)
临时关闭
setenforce 0
永久关闭(这个需要重启才能生效)
sed -i “s/SELINUX=enforcing/SELINUX=disabled/” /etc/selinux/config

1.2开放10050端口
firewall-cmd --permanent --add-port=10050/tcp
firewall-cmd --reload
当然。你也可以关闭防火墙:
systemctl stop firewalld
systemctl disable firewalld

1.3安装zabbix 软件源rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm

1.4安装zabbix-agent
yum install -y zabbix-sender zabbix-agent zabbix-get
1.5修改配置文件
vi /etc/zabbix/zabbix_agentd.conf
Server=115.236.176.0/24 (server ip)
zabbix-agent主动模式的安装和配置
ServerActive=115.236.176.107:7792(serverip)
zabbix-agent主动模式的安装和配置
Hostname=NJ_ErYuan_218.94.128.1339(agent ip 随意起,一般为agentip)
zabbix-agent主动模式的安装和配置

1.6启动zabbix-agent并设置开机自启
systemctl start zabbix-agent.service
systemctl enable zabbix-agent.service
查看zabbix-agent状态
systemctl status zabbix-agent.servicezabbix-agent主动模式的安装和配置