一、關閉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 二、安裝zabbix 軟件源 rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/7/x86_64/zabbix-release-2.4-1.el7.noarch.rpm 三、配置zabbix-agent 若是zabbix-agent在zabbix-server上,zabbix_agentd.conf 默認便可 若zabbix-agent不在zabbix-server上,則修改zabbix_agentd.conf 修改server的指向和hostname sed -i "s/Server=127.0.0.1/Server=10.0.0.101/" /etc/zabbix/zabbix_agentd.conf sed -i "s/ServerActive=127.0.0.1/ServerActive=10.0.0.101/" /etc/zabbix/zabbix_agentd.conf(主動模式) sed -i "s/Hostname=Zabbix server/Hostname=10.0.0.105/" /etc/zabbix/zabbix_agentd.conf 啓動並設置開機自啓 systemctl restart zabbix-agent.service systemctl enable zabbix-agent.service