首页 > 代码库 > zabbix客户端安装

zabbix客户端安装

zabbix_agentd 安装与配置

1)创建用户
#group zabbix
# useradd zabbix -s /sbin/nologin -M

2)安装

# tar -xf zabbix-2.4.4.tar.gz
# cd zabbix-2.4.4

./configure --prefix=/usr/local/zabbix --enable-agent
#make && make install

3)添加服务端口

#vi /etc/services

zabbix-agent   10050/tcp     # Zabbix Agent
zabbix-agent   10050/udp      # Zabbix Agent
zabbix-trapper  10051/tcp     # Zabbix Trapper
zabbix-trapper    10051/udp    # Zabbix Trapper

4)复制zabbix_agentd的启动文件

#cp /root/tool/zabbix-2.4.4/misc/init.d/fedora/core/zabbix_agentd  /etc/init.d/zabbix_agentd

#chmod +x /etc/rc.d/init.d/zabbix_agentd

 

5)修改zabbix_agentd启动文件

#vi /etc/init.d/zabbix_agentd
BASEDIR=/usr/local/zabbix/ #zabbix安装目录

#chkconfig zabbix_agentd on

6)修改zabbix_agent配置文件

#vim /usr/local/zabbix/etc/zabbix_agentd.conf
Server=127.0.0.1,192.168.32.137 #本机的IP与服务端IP
Hostname=ansible-client
LogFile=/tmp/zabbix_agentd.log
Include=/usr/local/zabbix/etc/zabbix_agentd.conf.d/
UnsafeUserParameters=1

 

7)启动与测试

[root@ansible-client zabbix-2.4.4]# service zabbix_agentd restart 

服务端测试:

[root@zabbix2 tool]# /usr/local/zabbix-2.4.4/bin/zabbix_get -s 192.168.32.130 -p 10050 -k "system.hostname"
ansible-client

 

zabbix客户端安装