hb_sz 发表于 2019-1-19 07:13:55

HA zabbix3.4

http://i2.运维网.com/images/blog/201803/02/ce89e73132eb3436a4f053c01593169a.png
————————————————————————————————————————
源文件
NGINX.repo
—————————————————

name=nginx repo
baseurl=http://nginx.org/packages/mainline/centos/7/$basearch/
gpgcheck=0
enabled=1
—————————————————
  MariaDB.repo
—————————————————

name = MariaDB
baseurl = https://mirrors.ustc.edu.cn/mariadb/yum/10.2/centos7-amd64
gpgkey=https://mirrors.ustc.edu.cn/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck=1
—————————————————
PHP.repo
—————————————————

name=Webtatic Repository EL7 - $basearch
#baseurl=https://repo.webtatic.com/yum/el7/$basearch/
mirrorlist=https://mirror.webtatic.com/yum/el7/$basearch/mirrorlist
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-webtatic-el7
  
name=Webtatic Repository EL7 - $basearch - Debug
#baseurl=https://repo.webtatic.com/yum/el7/$basearch/debug/
mirrorlist=https://mirror.webtatic.com/yum/el7/$basearch/debug/mirrorlist
failovermethod=priority
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-webtatic-el7
  
name=Webtatic Repository EL7 - $basearch - Source
#baseurl=https://repo.webtatic.com/yum/el7/SRPMS/
mirrorlist=https://mirror.webtatic.com/yum/el7/SRPMS/mirrorlist
failovermethod=priority
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-webtatic-el7
http://i2.运维网.com/images/blog/201803/02/f11e77cf55928cf42a7f1d0a5fdad102.png
——————————————————————————————————————————
以下是配置详情:
环境准备:
操作系统:Centos7
Mysql数据库:3台,主从从
192.168.1.31/32/33
31做主,VIP 192.168.1.30
Zabbix HA:192.168.1.34zabbix-server1
192.168.1.35 zabbix-server2
VIP:192.168.1.66
文件夹说明
zabbix-web/usr/share/nginx/html/zabbix/
zabbix_server.conf/etc/zabbix/
nginx.conf/etc/nginx/nginx.conf
     
 
准备工作
1./etc/hosts/写入2台服务器计算机名和ip地址
2.2台服务器双向ssh互通
3.关闭selinux
4.关闭防火墙
5.卸载已安装的Nginx,php,Mariadb
—————————————————
2台zabbix服务器安装装必要软件
#yum update -y
 
#yum install -y php72w-{fpm,tidy,bcmath,process,pdo,pgsql,xml,snmp,pear,gd,xmlrpc,common,mysql,xcache,mbstring,soap,ldap,cli,odbc,imap,devel,mcrypt,mssql}
zabbix-web zabbix-server MariaDB-client nginx pcs pacemaker
 
配置LNMP
————————————————————————
将/usr/share/zabbix 拷贝到/usr/share/nginx/html/下
#cd /usr/share/nginx/html/zabbix/conf/
拷贝conf文件夹下的zabbix.conf.php.example到/etc/zabbix/web/下并改名为zabbix.conf.php
#cp /usr/share/nginx/html/zabbix/conf/zabbix.conf.php.example /etc/zabbix/zabbix.conf.php
——————————————————
修改zabbix.conf.php:#vim zabbix.conf.php
页: [1]
查看完整版本: HA zabbix3.4