centos7安装zabbix-agent教程,


关闭SELinux

sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config
setenforce 0

防火墙设置,允许zabbix-agent的10050端口通过

firewall-cmd --permanent --add-port=10050/tcp
firewall-cmd --reload

当然。你也可以关闭防火墙:

systemctl stop firewalld
systemctl disable firewalld

安装zabbix 软件源

rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm

安装zabbix-agent

yum install zabbix-sender zabbix-agent zabbix-get

这里如果报错建议多试几次,可能是网络不好或者rp太差,亲测是可以用的。

在 /etc/zabbix/zabbix_agentd.conf 中更改:

Server=
ServerActive=
Hostname=<本机的名字>

设置启动和开机项

systemctl start zabbix-agent.service
systemctl enable zabbix-agent.service

相关内容