PXC安裝步驟_binary版本
1)安裝包
yum install -y cmake gcc gcc-c++ libaio libaio-devel automake autoconf bzr ncurses ncurses-devel boost bison libtool [ Debian/Ubuntu: ncurses5-devel libncurses5-dev]
yum install -y perl-DBD-MySQL perl-DBI perl-Time-HiRes
yum install -y scons boost* check* openssl #for GaleraCluster
yum install -y rsync lsof
yum install -y crypt socat
socat 需要手工下載安裝
yum install percona-xtrabackup-2.2.6-5042.el6.x86_64.rpm
yum install socat-1.7.2.4-1.el6.rf.x86_64.rpm
2)解壓 Percona-XtraDB-Cluster-5.6.22-rel72.0-25.8.978.Linux.x86_64.tar.gz 檔案【無需編譯】
#cd /soft
#tar -zxvf Percona-XtraDB-Cluster-5.6.22-rel72.0-25.8.978.Linux.x86_64.tar.gz -C /usr/local/ 【解壓】
#cd /usr/local/
#mv Percona-XtraDB-Cluster-5.6.22-rel72.0-25.8.978.Linux.x86_64 mysql 【修改路徑名】
3)將下載後的mysql安裝程式複製到其它節點
tar -zcvf PXC_MySQL_5.6.tar.gz mysql
scp 其它節點,解壓即可
4) galera元件
該元件已經在binary程式包中已經存在
/usr/local/mysql/bin/garbd
/usr/local/mysql/lib/libgalera_smm.so
#cp /usr/local/mysql/lib/libgalera_smm.so /usr/lib64/
記得設定以下引數
wsrep_provider=/usr/lib64/libgalera_smm.so
5)配置引數檔案my.cnf
6)建立資料庫
X86_64真實環境 連結以下庫檔案
ln -sf /usr/lib64/libssl.so.10 /usr/lib64/libssl.so.6
ln -sf /usr/lib64/libcrypto.so.10 /usr/lib64/libcrypto.so.6
7)只在第一個主節點做以下操作
/usr/local/mysql/scripts/mysql_install_db --defaults-file=/etc/my.cnf --user=mysql --basedir=/usr/local/mysql --datadir=/home/mysql_data/
8)設定配置檔案
#cp support-files/mysql.server /etc/init.d/mysql
#chkconfig --add mysqld
#chkconfig --level 2345 mysqld off
9) 啟動
第一個節點啟動:
service mysqld bootstrap-pxc
第二個節點啟動:
service mysqld start
第三個節點啟動:
service mysqld start
GRANT RELOAD, LOCK TABLES, REPLICATION CLIENT ON *.* TO 'sstuser'@'localhost'identified by 'sstuser789';
GRANT RELOAD, LOCK TABLES, REPLICATION CLIENT ON *.* TO 'sstuser'@'192.168.123.%'identified by 'sstuser789';
-------------------------
wsrep_restart_slave=1
wsrep_slave_threads=8
innodb_flush_method=O_DIRECT
OS引數設定:
vm.swappiness=0
yum install -y cmake gcc gcc-c++ libaio libaio-devel automake autoconf bzr ncurses ncurses-devel boost bison libtool [ Debian/Ubuntu: ncurses5-devel libncurses5-dev]
yum install -y perl-DBD-MySQL perl-DBI perl-Time-HiRes
yum install -y scons boost* check* openssl #for GaleraCluster
yum install -y rsync lsof
yum install -y crypt socat
socat 需要手工下載安裝
yum install percona-xtrabackup-2.2.6-5042.el6.x86_64.rpm
yum install socat-1.7.2.4-1.el6.rf.x86_64.rpm
2)解壓 Percona-XtraDB-Cluster-5.6.22-rel72.0-25.8.978.Linux.x86_64.tar.gz 檔案【無需編譯】
#cd /soft
#tar -zxvf Percona-XtraDB-Cluster-5.6.22-rel72.0-25.8.978.Linux.x86_64.tar.gz -C /usr/local/ 【解壓】
#cd /usr/local/
#mv Percona-XtraDB-Cluster-5.6.22-rel72.0-25.8.978.Linux.x86_64 mysql 【修改路徑名】
3)將下載後的mysql安裝程式複製到其它節點
tar -zcvf PXC_MySQL_5.6.tar.gz mysql
scp 其它節點,解壓即可
4) galera元件
該元件已經在binary程式包中已經存在
/usr/local/mysql/bin/garbd
/usr/local/mysql/lib/libgalera_smm.so
#cp /usr/local/mysql/lib/libgalera_smm.so /usr/lib64/
記得設定以下引數
wsrep_provider=/usr/lib64/libgalera_smm.so
5)配置引數檔案my.cnf
6)建立資料庫
X86_64真實環境 連結以下庫檔案
ln -sf /usr/lib64/libssl.so.10 /usr/lib64/libssl.so.6
ln -sf /usr/lib64/libcrypto.so.10 /usr/lib64/libcrypto.so.6
7)只在第一個主節點做以下操作
/usr/local/mysql/scripts/mysql_install_db --defaults-file=/etc/my.cnf --user=mysql --basedir=/usr/local/mysql --datadir=/home/mysql_data/
8)設定配置檔案
#cp support-files/mysql.server /etc/init.d/mysql
#chkconfig --add mysqld
#chkconfig --level 2345 mysqld off
9) 啟動
第一個節點啟動:
service mysqld bootstrap-pxc
第二個節點啟動:
service mysqld start
第三個節點啟動:
service mysqld start
GRANT RELOAD, LOCK TABLES, REPLICATION CLIENT ON *.* TO 'sstuser'@'localhost'identified by 'sstuser789';
GRANT RELOAD, LOCK TABLES, REPLICATION CLIENT ON *.* TO 'sstuser'@'192.168.123.%'identified by 'sstuser789';
-------------------------
wsrep_restart_slave=1
wsrep_slave_threads=8
innodb_flush_method=O_DIRECT
OS引數設定:
vm.swappiness=0
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9606353/viewspace-1824283/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Protobuf java版本安裝步驟Java
- linux mysql 安裝步驟- 原始碼安裝5.7.17 版本LinuxMySql原始碼
- mysql 8 windows 版本zip方式安裝步驟MySqlWindows
- NodeJS、NPM安裝配置步驟(windows版本)NodeJSNPMWindows
- vnc安裝步驟,vnc安裝步驟詳解VNC
- PXC安裝
- xftp安裝步驟,xftp安裝的2大步驟FTP
- STF 安裝步驟
- php安裝步驟PHP
- oracle 安裝步驟Oracle
- [ 安裝 ] Zeppelin安裝步驟!
- 高版本mysql8.0解壓版安裝步驟MySql
- windows安裝cnpm步驟WindowsNPM
- zookeeper安裝部署步驟
- Iris 框架安裝步驟框架
- anaconda安裝步驟
- Linux 安裝步驟Linux
- Nagios安裝步驟iOS
- charles的安裝步驟
- 安裝jdk的步驟JDK
- Sublime Text安裝步驟
- Centos安裝tmux步驟CentOSUX
- php安裝步驟(正式)PHP
- Ubuntu安裝cacti步驟Ubuntu
- 安裝weblogic步驟Web
- GreenPlum的安裝步驟
- 超詳細oracle 11g安裝步驟 win版本Oracle
- vnc安裝步驟,如何在Linux(CentOS 7)下vnc安裝步驟VNCLinuxCentOS
- vnc安裝步驟,4個在Linux下vnc的個安裝步驟VNCLinux
- ubuntu 下安裝nginx步驟UbuntuNginx
- MHA安裝和部署步驟
- Linux安裝Nginx步驟LinuxNginx
- CDH6.2.0安裝步驟
- Centos 7 安裝VNC步驟CentOSVNC
- LNMPPHP軟體安裝步驟LNMPPHP
- 簡單oracle安裝步驟Oracle
- ArcGis10安裝步驟
- Nsca安裝簡單步驟