1、操作系统版本
- 查看操作系统版本
cat /etc/issue
CentOS release 6.5 (Final)
- 关闭selinux
sed
-i
"s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config
setenforce
0
- 或者防火墙放行zabbix-agent端口
允许zabbix-agent的10050端口通过
iptables
-AINPUT
-ptcp
--dport
10050-j
ACCEPT
2、下载zabbix 软件源
wget http://repo.zabbix.com/zabbix/3.0/rhel/6/i386/zabbix-agent-3.0.9-1.el6.i686.rpm
3、安装zabbix-agent
yum -y update selinux-policy.noarch selinux-policy-targeted.noarch
yum -y localinstall zabbix-agent-3.0.9-1.el6.i686.rpm
4、配置zabbix-agent
- 修改zabbix_agentd.conf 修改server的指向和hostname
sed -i
"s/Server=127.0.0.1/Server=10.10.242.23/" /etc/zabbix/zabbix_agentd
.conf
sed -i
"s/ServerActive=127.0.0.1/ServerActive=10.10.242.23/" /etc/zabbix/zabbix_agentd
.conf
sed -i
"s/Hostname=Zabbix server/Hostname=hq-192.168.4.36/"/etc/zabbix/zabbix_agentd
.conf
- 启动并设置开机自启
service zabbix
-agentrestart
chkconfig zabbix
-agenton