标签:shel scp maria 撰写 lib64 yum 复制配置 log centos7
MariaDB的Galera-cluster实现高可用的详细步骤?
?
?
a、 master1:192.168.36.121
b、 master2:192.168.36.120
c、 master3:192.168.36.27
?
vim /etc/yum.repos.d/galera.repo
[mysql]
baseurl=https://mirrors.tuna.tsinghua.edu.cn/mariadb/mariadb-5.5.64/yum/centos7-amd64/
gpgcheck=0
?
a) scp /etc/yum.repos.d/galera.repo 192.168.36.120:/etc/yum.repos.d/
b) scp /etc/yum.repos.d/galera.repo 192.168.36.27:/etc/yum.repos.d/
?
yum install MariaDB-Galera-server
注意:
1、大小写敏感
2、如果已经安装了mariadb-server,Galera安装是会卸载mariadb-server
?
vim /etc/my.cnf.d/server.cnf
[galera]
wsrep_provider = /usr/lib64/galera/libgalera_smm.so
wsrep_cluster_address="gcomm://192.168.36.121,192.168.36.120,192.168.36.27"
binlog_format=row
#default_storage_engine=InnoDB
#innodb_autoinc_lock_mode=2
#bind-address=0.0.0.0
#下面配置可选项
wsrep_cluster_name = ‘mycluste’ #默认my_wsrep_cluster
wsrep_node_name = ‘node1‘ #可以不配置,对应服务器修改
wsrep_node_address = ‘192.168.36.121’ #可以不配置,对应服务器修改
?
a) scp /etc/my.cnf.d/server.cnf 192.168.36.120:/etc/my.cnf.d/
b) scp /etc/my.cnf.d/server.cnf 192.168.36.27:/etc/my.cnf.d/
?
/etc/init.d/mysql start --wsrep-new-cluster
或者:service mysql start --wsrep-new-cluster
?
service mysql start
?
使用xshell的撰写窗格,在3台服务器上同时创建表或数据库。
MariaDB-Galera-cluster实现mariadb高可用的详细步骤
标签:shel scp maria 撰写 lib64 yum 复制配置 log centos7
原文地址:https://blog.51cto.com/13560168/2393185