如何在 x86 服务器上安装 Percona XtraDB Cluster?

如何在 x86 服务器上安装 Percona XtraDB Cluster?

我将从 MySQL 复制迁移到Percona XtraDB集群。我面临的问题是一个节点在 x86 上运行,我无法Percona-XtraDB-Cluster-serverPercona 仓库由于解决的问题:

...
--> Finished Dependency Resolution
1:Percona-XtraDB-Cluster-server-5.5.27-23.6.356.rhel5.i686 from percona has depsolving problems
  --> Missing Dependency: Percona-XtraDB-Cluster-galera is needed by package 1:Percona-XtraDB-Cluster-server-5.5.27-23.6.356.rhel5.i686 (percona)
Error: Missing Dependency: Percona-XtraDB-Cluster-galera is needed by package 1:Percona-XtraDB-Cluster-server-5.5.27-23.6.356.rhel5.i686 (percona)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest

正如你所见,Percona-XtraDB-Cluster-galera不存在回购

我该如何解决这个问题?

答案1

不知道为什么Percona-XtraDB-Cluster-galeraPercona 仓库中缺少这个。但你可以从源代码编译

首先,下载并安装Galera wsrep 提供商

Name        : galera                       Relocations: (not relocatable)
Version     : 23.2.1                            Vendor: Codership Oy
Release     : 1.rhel5                       Build Date: Sat 19 May 2012 04:16:24 AM ICT
Install Date: Mon 10 Sep 2012 05:22:01 PM ICT      Build Host: centos5_32builder.localdomain
Group       : System Environment/Libraries   Source RPM: galera-23.2.1-1.rhel5.src.rpm
Size        : 22430313                         License: GPLv3
Signature   : (none)
Packager    : Codership Oy
URL         : http://www.codership.com/
Summary     : Galera: a synchronous multi-master wsrep provider (replication engine)
Description :
Galera is a fast synchronous multimaster wsrep provider (replication engine)
for transactional databases and similar applications. For more information
about wsrep API see http://launchpad.net/wsrep. For a description of Galera
replication engine see http://www.codership.com.

二、下载Percona-XtraDB-Cluster的源代码并安装关注指南。请注意,由于您运行的是 x86,请通过运行以下命令来构建二进制文件:

# cd Percona-XtraDB-Cluster-5.5.27
# BUILD/compile-pentium-wsrep
# make install

第三,将其更改/etc/my.cnf为如下内容:

[mysqld]
# Percona XtraDB Cluster
binlog_format=ROW

wsrep_provider=/usr/lib/galera/libgalera_smm.so

wsrep_slave_threads=2
wsrep_cluster_name=trimethylxanthine
wsrep_sst_method=rsync
wsrep_node_name=node2

innodb_locks_unsafe_for_binlog=1
innodb_autoinc_lock_mode=2


[mysqld_safe]
wsrep_urls=gcomm://192.168.1.100:4567, \
           gcomm://192.168.1.200:4567, \
           gcomm://192.168.1.300:4567, \
           gcomm://

不要忘记调整初始化脚本/etc/init.d/mysql以指向相应的 MySQL 二进制文件:

if test -z "$basedir"
then
  basedir=/usr
  #bindir=/usr/bin
  bindir=/usr/local/mysql/bin
  if test -z "$datadir"
  then
    datadir=/var/lib/mysql
  fi
  sbindir=/usr/sbin
  libexecdir=/usr/sbin
else
...

相关内容