使用mysql的galera做多主集群配置,galera的集群优势网络上面有对比,这里不在叙述。
1. 新建3台虚拟机(centos6.5)
node1:172.17.44.163
node2:172.17.44.164
node3:172.17.44.165
他们没有主从关系,所有配置都应该一样。
2. 建立软件源
我们有一个内部的软件yum 源,至于怎么建立源服务器,可参考网络上的介绍,我们的源文件的nailgun.repo
[nailgun]
name=Nailgun
baseurl=http://172.17.44.2:8080/centos/fuelweb/x86_64/
gpgcheck=0
将这个文件放在/etc/yum.repo.d/目录下
3. 搜索和mysql galera有关的软件安装包 执行结果:
[root@ha1 yum.repos.d]# yum search wsrep
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* epel: mirrors.ustc.edu.cn
* extras: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
===================================================================================== N/S Matched: wsrep =======================================