1,解压zabbix包
tar xzf zabbix-2.4.7.tar.gz
2,安装zabbix agent
./configure --prefix=/usr/local/zabbix_agent --enable-agent
make install
3,进入安装时候指定的目录下ETC修改配置文件
vim /usr/local/zabbix_agent/etc/zabbix_agent.conf
4,复制启动文件到系统etc目录下,并赋执行权限
cp misc/init.d/fedora/core/zabbix_agentd /etc/init.d/
chmod a+x /etc/init.d/zabbix_*
5,启动zabbix_agent
此时启动会报错
Starting zabbix_agentd: /etc/init.d/functions: line 546: /usr/local/sbin/zabbix_agentd: 没有那个文件或目录 [失败]
解决办法,建立软链接
ln -s /usr/local/zabbix_agent/sbin/zabbix_agentd /usr/local/sbin/zabbix_agentd
启动报错
[root@zentao zabbix-2.4.7]# service zabbix_agentd start Starting zabbix_agentd: zabbix_agentd [55138]: user zabbix does not exist zabbix_agentd [55138]: cannot run as root! [失败]
解决办法,新建用户
groupadd zabbix useradd -g zabbix zabbix
[root@zentao zabbix-2.4.7]# service zabbix_agentd start Starting zabbix_agentd: [确定]
END !