**由于不想博客篇幅太长,本实验是在zabbix已经安装配置好的基础上开始做的:
基础实验配置请参考:https://mp.youkuaiyun.com/mdeditor/81736380**
关于企业6和企业7虚拟机的封装可以参考:https://blog.youkuaiyun.com/aaaaaab_/article/details/81712766**
结合nginx搭建zabbix监控:
实验环境:server3: 172.25.38.3 agent端 企业6
loaclhost: 172.25.38.11 企业7
server2: 172.25.38.2 proxy端 企业6
最后的代理实验就是agent-->proxy-->localhost
在企业6版本的server3,:
关于企业6企业7版本虚拟机的封装可以查看https://blog.youkuaiyun.com/aaaaaab_/article/details/81712766
[root@server3 ~]# ls
mysql-proxy-0.8.5-linux-el6-x86-64bit.tar.gz
zabbix-agent-3.4.6-1.el6.x86_64.rpm
[root@server3 ~]# ls
mysql-proxy-0.8.5-linux-el6-x86-64bit.tar.gz
nginx-1.8.0-1.el6.ngx.x86_64.rpm
zabbix-agent-3.4.6-1.el6.x86_64.rpm
[root@server3 ~]# rpm -ivh nginx-1.8.0-1.el6.ngx.x86_64.rpm 安装nginx
warning: nginx-1.8.0-1.el6.ngx.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 7bd9bf62: NOKEY
Preparing... ########################################### [100%]
1:nginx ########################################### [100%]
----------------------------------------------------------------------
Thanks for using nginx!
Please find the official documentation for nginx here:
* http://nginx.org/en/docs/
Commercial subscriptions for nginx are available on:
* http://nginx.com/products/
----------------------------------------------------------------------
[root@server3 ~]# pwd
/root
[root@server3 ~]# ls
mysql-proxy-0.8.5-linux-el6-x86-64bit.tar.gz
nginx-1.8.0-1.el6.ngx.x86_64.rpm
zabbix-agent-3.4.6-1.el6.x86_64.rpm
[root@server3 ~]# cd /etc/nginx/
[root@server3 nginx]# ls
conf.d koi-utf mime.types scgi_params win-utf
fastcgi_params koi-win nginx.conf uwsgi_params
[root@server3 nginx]# cd conf.d/
[root@server3 conf.d]# ls
default.conf example_ssl.conf
[root@server3 conf.d]# cd ..
[root@server3 nginx]# cd -
/etc/nginx/conf.d
[root@server3 conf.d]# ls
default.conf example_ssl.conf
[root@server3 conf.d]# vim default.conf 加入一个location
[root@server3 conf.d]# nginx -t 检测nginx语法
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
[root@server3 conf.d]# nginx 启动nginx
[root@server3 conf.d]# nginx -s reload 重载服务
在网页测试可以查看到状态:
添加访问黑白名单,为了安全性:
[root@server3 conf.d]# vim default.conf 加入允许访问的主机,拒绝所有