Mysql
如何在 x86 伺服器上安裝 Percona XtraDB Cluster?
我將從 MySQL 複製遷移到Percona XtraDB Cluster。我面臨的問題是一個節點在 x86 上執行,由於解決問題,我無法
Percona-XtraDB-Cluster-server
從Percona儲存庫安裝:... --> 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
如您所見,repo
Percona-XtraDB-Cluster-galera
中不存在。我該如何解決這個問題?
不知道為什麼
Percona-XtraDB-Cluster-galera
Percona 儲存庫中缺少 。但是你可以從原始碼編譯。首先,下載並安裝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://
不要忘記調整 init 腳本
/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 ...