1.安装编译环境
# yum -y groupinstall “Development Tools” “Server Paltform Development”
2.关闭防火墙和selinux
# iptables -F # setenforce 0
3.创建zabbix用户组和zabbix用户
# groupadd zabbix # useradd -g zabbix zabbix
4.编译安装zabbix-agentd
# tar xf zabbix-2.4.7.tar.gz # cd zabbix-2.4.7 # ./comfigure --prefix=/usr/local/zabbix --enable-agent # make && make install
5.修改配置文件
# vim /usr/local/zabbix/etc/zabbix_agentd.conf PidFile=/var/run/zabbix/zabbix_agentd.pid //pid文件路径 LogFile=/var/log/zabbix/zabbix_agentd.log //日志文件路径 Server=172.16.18.20 //监控端IP Hostname=192.168.235.131 //agentd IP
6.设置日志文件、pid文件权限
# chown zabbix:zabbix /var/run/zabbix # chown zabbix:zabbix /var/log/zabbix
7.将启动服务文件拷贝到/etc/init.d/ 目录下,并修改配置文件
# cd zabbix-2.4.7 # cp misc/init.d/fedora/core/zabbix_agentd /etc/init.d/ # vim /etc/init.d/zabbix_agentd BASEDIR=/usr/local/zabbix # chmod 755 /etc/init.d/zabbix_agentd //赋予文件执行权限
8.开机启动
# chkconfig zabbix_agentd on # service zabbix_agentd start # ss -tnlp | grep 10050 //查看agentd服务是否启动成功
9.监控agentd
转载于:https://blog.51cto.com/9480860/1739875