客户端yum安装zabbix

   1.通服务器一样,安装zabbix源

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm

    2.安装zabbix服务端(因含有井号,就只能截图了)

安装之后可以写入开机自启动

服务端

chmod +x /etc/rc.d/rc.local
cat >>/etc/rc.d/rc.local<<EOF
systemctl start mariadb.service
systemctl start httpd
systemctl start zabbix-server
EOF

客户端

chmod +x /etc/rc.d/rc.local
cat >>/etc/rc.d/rc.local<<EOF
systemctl start  zabbix-agent.service
EOF

测试连通性

服务器端安装zabbix-get

yum install zabbix-get -y

安装完成后,执行

zabbix_get -s 192.168.137.104 -p 10050 -k "system.cpu.load[all,avg1]"

就可以看到如下的结果

猜你喜欢

转载自my.oschina.net/bobwei/blog/1786334