安装基础软件包
yum install wget vimtree gcc gcc-c++ -y安装zabbix_agentd
groupadd -g zabbixuseradd -g zabbix -s /sbin/nologin zabbixcd /usr/srctar xf /root/zabbix-2.4.5.tar.gzcd zabbix-2.4.5./configure --PRefix=/usr/local/zabbix --enable-agentmake&& make install创建zabbix日志目录
mkdir/var/log/zabbixchown zabbix.zabbix /var/log/zabbix复制zabbix_agentd启动文件到/etc/init.d目录下
cp misc/init.d/fedora/core/zabbix_agentd /etc/init.d/chmod 755 /etc/init.d/zabbix_agentd修改启动配置文件和软链接
sed -i "s@BASEDIR=/usr/local@BASEDIR=/usr/local/zabbix@g" /etc/init.d/zabbix_agentdln -s/usr/local/zabbix/etc/ /etc/zabbixln -s/usr/local/zabbix/bin/* /usr/binln -s/usr/local/zabbix/sbin/* /usr/sbin/修改/etc/zabbix/zabbix_agentd.conf 这里的ip地址写的是zabbix_server端的IP地址
sed -i "s@Server=127.0.0.1@Server=10.10.10.220@g" /etc/zabbix/zabbix_agentd.confsed -i "s@ServerActive=127.0.0.1@ServerActive=10.10.10.220:10051@g" /etc/zabbix/zabbix_agentd.confsed -i "s@tmp/zabbix_agentd.log@var/log/zabbix/zabbix_agentd.log@g" /etc/zabbix/zabbix_agentd.confsed -i "s@^# UnsafeUserParameters=0@UnsafeUserParameters=1/n@g" /etc/zabbix/zabbix_agentd.conf设置zabbix_agentd开机自动启动,并启动zabbix_agentd服务
chkconfig zabbix_agentd on/etc/init.d/zabbix_agentd start新闻热点
疑难解答