PXC5.6实验集群的安装与设置

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

PXC5.6实验集群的安装与设置Ver.变更日期变更者说明12015/7/7王旭东初版目录1.目的:......................................................................................42.集群构成:..............................................................................52.1.集群构成图:..................................................................52.2.集群构成明细:..............................................................53.安装设置操作步骤:...............................................................63.1.安装PerconaYumRepository:......................................63.2.安装EPEL源:................................................................73.3.安装PXC...........................................................................73.4.创建及设置数据目录......................................................83.5.开通PXC相关IP端口.....................................................93.6.关闭SELinux..................................................................103.7.设置my.cnf启动项文件................................................103.8.启动集群........................................................................124.通过HAProxy实现PXC集群负载均衡:..............................144.1.安装HAProxy.................................................................144.2.设置HAProxy.................................................................144.3.启动HAProxy.................................................................164.4.增加集群状态检查进程用Mysql用户权限.................164.5.为集群每一个节点服务器安装xinetd..........................174.6.配置xinetd.....................................................................174.7.通过HAProxy查看数据库集群状态:.........................185.用Keepalived解决HAProxy单点故障:..............................205.1.安装配置备份代理服务器............................................205.2.安装Keepalived.............................................................215.3.在主HAProxy代理服务器中设置Keepalived...............215.4.在备份HAProxy代理服务器中设置Keepalived...........235.5.验证虚拟IP的漂移.......................................................246.问题排查及解决:.................................................................256.1.ERROR1047(08S01):WSREPhasnotyetpreparednodeforapplicationuse..........................................................................251.目的:本手册用于介绍如何通过在三台CentOS6.6服务器上安装PerconaXtraDBCluster5.6,来搭建一个拥有三个数据节点的的MySQL数据库集群。以及如何用另外两台CentOS6.6服务器,通过安装HAPrxoy+Keepalived来实现MySQL集群的负载均衡。从而获得一个具备高可用性的数据库集群。本手册各章节详细介绍了每台服务器上需要安装的服务,以及各种服务的配置与启动的详细步骤。2.集群构成:2.1.集群构成图:CentOS-W1192.168.82.29CentOS-W2192.168.82.30CentOS-W3192.168.82.31CentOS-L1192.168.82.40CentOS-L2192.168.82.41VIP:192.168.82.200HAProxy+KeepalivedPerconaXtraDBCluster2.2.集群构成明细:1、HAProxy+Keepalived主代理服务器主机名:CentOS-L1IP地址:192.168.82.402、HAProxy+Keepalived备份代理服务器主机名:CentOS-L3IP地址:192.168.82.413、PXC数据节点1主机名:CentOS-W1IP地址:192.168.82.294、PXC数据节点2主机名:CentOS-W2IP地址:192.168.82.305、PXC数据节点3主机名:CentOS-W3IP地址:192.168.82.31以上服务器的系统版本皆为CentOS6.6。用户名和密码都相同,为(root/root01);3.安装设置操作步骤:首先以root用户权限登录到Node1,安装与设置PXC5.6。然后再以此登录到Node2和Node3进行几乎相同的安装与设置操作。3.1.安装PerconaYumRepository:首先通过rpm安装Perconatestingrepository(红字内容):其次通过rpm安装Perconareleaserepository(红字内容):[root@CentOS-W1~]#rpm-Uhv://repo.percona.com/testing/centos/6/os/noarch/percona-testing-0.0-1.noarch.rpmwarning:/var/tmp/rpm-tmp.oSUcj4:HeaderV4DSA/SHA1Signature,keyIDcd2efd2a:NOKEYPreparing...###########################################[100%]1:percona-testing###########################################[100%][root@CentOS-W1~]#rpm-Uhv://[100%]1:percona-release###########################################[100%]3.2.安装EPEL源:如果不安装EPEL源(ExtraPackagesforEnterpriseLinux)来获取额外的软件包,那就会在安装PXC发生Dependancyissue,被告知“requiressocat”。安装EPEL的命令如下(红字内容):3.3.安装PXC通过yum从PerconaYumRepository获取PXCServer、PXCClient、和PXCGalera(红字内容):[root@CentOS-W1~]#wget:06:01--正在解析主机download.fedoraproject.org...66.35.62.162,67.203.2.67,67.219.144.68,...正在连接download.fedoraproject.org|66.35.62.162|:80...已连接。已发出HTTP请求,正在等待回应...302Found位置:[跟随至新的URL]--2015-07-0710:06:04--正在解析主机mirrors.neusoft.edu.cn...219.216.128.25正在连接mirrors.neusoft.edu.cn|219.216.128.25|:80...已连接。已发出HTTP请求,正在等待回应...200OK长度:14540(14K)[application/x-redhat-package-manager]正在保存至:“epel-release-6-8.noarch.rpm”100%[==============================================================================================================================]14,54016.1K/sin0.9s2015-07-0710:06:05(16.1KB/s)-已保存“epel-release-6-8.noarch.rpm”[14540/14540])[root@CentOS-W1~]#rpm-ivhepel-release-6-8.noarch.rpmwarning:epel-release-6-8.noarch.rpm:Hea

1 / 25
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功