zabbix部署(二)
客户端部署1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# find /etc/yum.repos.d/ -name '*.repo' -exec mv {} {}.back \;
# vim /etc/yum.repos.d/aliyun.repo
name=centos6
baseurl=https://mirrors.aliyun.com/centos/6/os/x86_64/
enabled=1
gpgkey=https://mirrors.aliyun.com/centos/6/os/x86_64/RPM-GPG-KEY-CentOS-6
gpgcheck=1
name=Extra Packages for Enterprise Linux 6 - $basearch
baseurl=http://mirrors.aliyun.com/epel/6/$basearch
http://mirrors.aliyuncs.com/epel/6/$basearch
failovermethod=priority
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
# yum -y install zabbix22-agent.x86_64
# service zabbix-agentd start
# chkconfig zabbix-agent on
# cd /etc/zabbix/
# cp zabbix_agent.conf zabbix_agent.conf.bak
# vim zabbix_agent.conf
Server=192.168.1.111 #服务端ip地址
# vim /etc/zabbix_agentd.conf
Server=192.168.1.111
ServerActive=192.168.1.111
# service zabbix-agentd restart
部署完成后在服务端测试,能获取到客户端主机名,说明服务端能对客户端进行监控
1
2
# zabbix_get -s 192.168.1.102 -k system.hostname
www.nginx.com
页:
[1]