PERCONAXTRADB cluster installation on Redhat Linux

Source: Internet
Author: User
Tags percona

INSTALLING-PERCONAXTRADB Cluster 5.6

For Redhat 6.4

One, server version view

root# Cat/etc/redhat-release

Red hatenterprise Linux Server release 6.4 (Santiago)

Second, the new directory:

Root#mkdir-p/softwares

Third, download RPM package

1. Download Xtradbcluster Package

wgethttp://www.percona.com/redir/downloads/percona-xtradb-cluster-56/latest/rpm/rhel6/x86_64/ percona-xtradb-cluster-56-5.6.15-25.5.759.rhel6.x86_64.rpm

wget http://www.percona.com/redir/downloads/Percona-XtraDB-Cluster-56/LATEST/RPM/rhel6/x86_64/ percona-xtradb-cluster-56-debuginfo-5.6.15-25.5.759.rhel6.x86_64.rpm

wgethttp://www.percona.com/redir/downloads/percona-xtradb-cluster-56/latest/rpm/rhel6/x86_64/ percona-xtradb-cluster-client-56-5.6.15-25.5.759.rhel6.x86_64.rpm

wgethttp://www.percona.com/redir/downloads/percona-xtradb-cluster-56/latest/rpm/rhel6/x86_64/ percona-xtradb-cluster-devel-56-5.6.15-25.5.759.rhel6.x86_64.rpm

wget http://www.percona.com/redir/downloads/Percona-XtraDB-Cluster-56/LATEST/RPM/rhel6/x86_64/ percona-xtradb-cluster-full-56-5.6.15-25.5.759.rhel6.x86_64.rpm

wgethttp://www.percona.com/redir/downloads/percona-xtradb-cluster-56/latest/rpm/rhel6/x86_64/ percona-xtradb-cluster-galera-3-3.4-1.213.rhel6.x86_64.rpm

wgethttp://www.percona.com/redir/downloads/percona-xtradb-cluster-56/latest/rpm/rhel6/x86_64/ percona-xtradb-cluster-galera-3-debuginfo-3.4-1.213.rhel6.x86_64.rpm

wgethttp://www.percona.com/redir/downloads/percona-xtradb-cluster-56/latest/rpm/rhel6/x86_64/ percona-xtradb-cluster-server-56-5.6.15-25.5.759.rhel6.x86_64.rpm

wgethttp://www.percona.com/redir/downloads/percona-xtradb-cluster-56/latest/rpm/rhel6/x86_64/ percona-xtradb-cluster-shared-56-5.6.15-25.5.759.rhel6.x86_64.rpm

wget http://www.percona.com/redir/downloads/Percona-XtraDB-Cluster-56/LATEST/RPM/rhel6/x86_64/ percona-xtradb-cluster-test-56-5.6.15-25.5.759.rhel6.x86_64.rpm

2. Download Xtrabackup Package

wget http://www.percona.com/redir/downloads/XtraBackup/LATEST/RPM/rhel6/x86_64/ percona-xtrabackup-2.1.9-744.rhel6.x86_64.rpm

wget http://www.percona.com/redir/downloads/XtraBackup/LATEST/RPM/rhel6/x86_64/ percona-xtrabackup-debuginfo-2.1.9-744.rhel6.x86_64.rpm

Wget

http://www.percona.com/redir/downloads/XtraBackup/LATEST/RPM/rhel6/x86_64/ percona-xtrabackup-test-2.1.9-744.rhel6.x86_64.rpm

Iv. installation of dependent packages

1. installation package Preparation

installation CD in the package directory: perl-dbd-mysql-4.013-3.el6.x86_64.rpm

wget http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/socat-1.7.2.4-1.el6.rf.x86_64.rpm

Wget

http://mirror.centos.org/centos/6/os/x86_64/Packages/nc-1.84-22.el6.x86_64.rpm

2. Installation

RPM-IVH perl-dbd-mysql-4.013-3.el6.x86_64.rpm socat-1.7.2.4-1.el6.rf.x86_64.rpmnc-1.84-22.el6.x86_64.rpm

V. Delete the original package

Rpm-qa | Grepmysql | Xargs sudo rpm-e--nodeps

VI. Installation

1, installation Percona-xtrabackup

rpm-ivhpercona-xtrabackup-2.1.9-744.rhel6.x86_64.rpm

2, Installation Percona-xtradb-cluster-galera

Rpm-ivhpercona-xtradb-cluster-galera-3-3.5-1.216.rhel6.x86_64. rpmpercona-xtradb-cluster-galera-3-debuginfo-3.5-1.216.rhel6.x86_64.rpm

3, Installation Percona-xtradb-cluster-client

rpm-ivhpercona-xtradb-cluster-client-56-5.6.15-25.5.759.rhel6.x86_64.rpm

4, Installation Percona-xtradb-cluster-server

rpm-ivhpercona-xtradb-cluster-server-56-5.6.15-25.5.759.rhel6.x86_64.rpm

Vii. Modifying configuration files

Find/-name ' my-default.cnf '

CP MY-DEFAULT.CNF/ETC/MY.CNF

Eight, cluster configuration

Add the following section to the configuration file: (/ETC/MY.CNF)

Percona XtraDB Cluster documentation, Release 5.6.15-25.5

[Mysqld]

Datadir=/var/lib/mysql

User=mysql

# Path to Galera Library

Wsrep_provider=/usr/lib64/libgalera_smm.so

# Cluster Connection URL contains the IPs of Node#1,node#2 and Node#3

wsrep_cluster_address=gcomm://192.168.70.71,192.168.70.72,192.168.70.73

# in order for Galera to work correctly Binlog Formatshould is ROW

Binlog_format=row

# MyISAM Storage engine had only experimental support

Default_storage_engine=innodb

# This changes how InnoDB AutoIncrement locks was Managedand is a requirement for Galera

innodb_autoinc_lock_mode=2

# Node #1 Address

wsrep_node_address=192.168.70.71 # Native IP address

# SST Method

Wsrep_sst_method=xtrabackup-v2

# Cluster Name

Wsrep_cluster_name=my_centos_cluster

# Authentication for SST method

Wsrep_sst_auth= "Sstuser:s3cret"

Note: The other node configuration file, note wsrep_node_address=192.168.70.71 # native IP address.

Execute on the first node:

[Email protected]> CREATE USER ' [email protected] ' localhost ' identified by ' S3cret ';

[Email protected]> GRANT RELOAD, LOCK TABLES, replicationclient on

* * to ' sstuser ' @ ' localhost ';

[Email protected]> FLUSH privileges;

Nine, start

First node:/etc/init.d/mysql BOOTSTRAP-PXC

Other nodes:/etc/init.d/mysqlstart

X. Change the root password and authorize access from any host

Log in to MySQL:

Mysql-u root–p

Mysql>

GRANT all privileges on * * to ' root ' @ '% ' identified by ' MySQL ' with GRANT OPTION;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.