由於之前安裝都是拷貝同事的zabbix_agent.tar.gz包,可是我在網上找了一大圈都沒有找到這個tar包是從哪里來的,畢竟新手,太笨...so最后自己排錯,找到了比較便捷的方式,直接通過yum安裝后更改參數來啟動.
- 環境:centos 7
- zabbix版本:3.4
- 參考官網教程<https://www.zabbix.com/documentation/3.4/manual/installation/install_from_packages/rhel_centos>
①添加yum源:
rpm -ivh https://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm #centos7
rpm -ivh https://repo.zabbix.com/zabbix/3.4/rhel/6/x86_64/zabbix-release-3.4-1.el6.noarch.rpm #centos6
rpm -ivh https://repo.zabbix.com/zabbix/3.4/rhel/5/x86_64/zabbix-release-3.4-1.noarch.rpm #centos5
②安裝:
yum-config-manager --enable rhel-7-server-optional-rpms
yum install -y zabbix-agent
🎬:yum-config-manager 命令不存在,請執行 yum -y install yum-utils
③編輯配置文件
vim zabbix_agentd.conf #根據需要配置你的 hostname 以及被動模式下的 Server 地址,主動模式下的 ServerActive 地址.
---------------------------
④啟動服務:
service zabbix-agent start 或者 systemctl start zabbix-agent
--------------------------
⑤zabbix agent配置文件參數說明,可參考我的另一篇博文:http://www.cnblogs.com/jonnyan/p/9045741.html