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/tcpfirewall-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

yum install -y zabbix-sender zabbix-agent zabbix

sed -i "s/Server=127.0.0.1/Server=10.0.0.101/" /etc/zabbix/zabbix_agentd.conf

    後面的ip地址爲zabbix服務端的主機ip地址 sed -i "s/ServerActive=127.0.0.1/ServerActive=10.0.0.101/" /etc/zabbix/zabbix_agentd.conf

    後面的ip地址爲zabbix服務端的主機ip地址 sed -i "s/Hostname=Zabbix server/Hostname=10.0.0.105/" /etc/zabbix/zabbix_agentd.conf

    後面的ip地址爲zabbix客戶端的主機ip地址


  • 啓動並設置開機自啓

systemctl restart zabbix-agent.service
systemctl enable zabbix-agent.service

最後一步,驗證10050端口是否打開

netstat -tlnp | grep 10050

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章