zabbix client端安装

2/13/2017来源:经验技巧人气:1958

安装基础软件包

yum install wget vimtree gcc gcc-c++ -y

安装zabbix_agentd

groupadd -g zabbix useradd -g zabbix -s /sbin/nologin zabbix cd /usr/src tar xf /root/zabbix-2.4.5.tar.gz cd zabbix-2.4.5 ./configure --PRefix=/usr/local/zabbix --enable-agent make&& make install

创建zabbix日志目录

mkdir/var/log/zabbix chown 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 "[email protected]=/usr/[email protected]=/usr/local/[email protected]" /etc/init.d/zabbix_agentd ln -s/usr/local/zabbix/etc/ /etc/zabbix ln -s/usr/local/zabbix/bin/* /usr/bin ln -s/usr/local/zabbix/sbin/* /usr/sbin/

修改/etc/zabbix/zabbix_agentd.conf 这里的ip地址写的是zabbix_server端的IP地址

sed -i "[email protected][email protected][email protected]" /etc/zabbix/zabbix_agentd.conf sed -i "[email protected][email protected]=10.10.10.220:[email protected]" /etc/zabbix/zabbix_agentd.conf sed -i "[email protected]/[email protected]/log/zabbix/[email protected]" /etc/zabbix/zabbix_agentd.conf sed -i "[email protected]^# [email protected]=1\[email protected]" /etc/zabbix/zabbix_agentd.conf

设置zabbix_agentd开机自动启动,并启动zabbix_agentd服务

chkconfig zabbix_agentd on /etc/init.d/zabbix_agentd start