Zabbix客户端(被监控端)安装

2013-04-11 18,379次浏览 发表评论

用户组建立

groupadd -g 1006 zabbix
useradd -u 1006 -g 1006 -s /sbin/nologix -M zabbix

安装

wget http://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.0.5/zabbix-2.0.5.tar.gz
tar zxvf zabbix-2.0.5.tar.gz && cd zabbix-2.0.5
./configure --prefix=/usr/local/zabbix --enable-agent
make && make install

添加服务端口和修改启动脚本

sed -i "/^# Local services/izabbix-agent    10050/tcp                       #Zabbix Agent" /etc/services
sed -i "/^# Local services/izabbix-agent    10050/udp                       #Zabbix Agent" /etc/services
cp misc/init.d/fedora/core/zabbix_agentd /etc/init.d/
sed -i 's/BASEDIR=/usr/local/BASEDIR=/usr/local/zabbix/g' /etc/init.d/zabbix_agentd
chkconfig --add zabbix_agentd
chkconfig zabbix_agentd on

修改zabbix_agent配置文件

vim /usr/local/zabbix/etc/zabbix_agentd.conf
Server=192.168.1.140
Hostname=linux server1
PidFile=/var/tmp/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log

创建日志

mkdir /var/log/zabbix
touch /var/log/zabbix/zabbix_agentd.log
chown -R zabbix.zabbix /var/log/zabbix

启动

/etc/init.d/zabbix_agentd start

评论

随便说点,聊聊天~