Ready-to-use binaries are available from the Percona XtraDB Cluster download page, including:
- RPM packages for RHEL 5, RHEL 6, and RHEL 7
- Debian packages
- Generic .tar.gz packages
Percona provides repositories for yum (RPM packages for Red Hat, CentOS and Amazon Linux AMI) and apt (.deb packages for Ubuntu and Debian) for software such as Percona Server, XtraDB, XtraBackup, and Percona Toolkit. This makes it easy to install and update your software and its dependencies through your operating system’s package manager.
This is the recommend way of installing where possible. Make sure to remove existing PXC-5.5 and PS-5.5/5.6 packages before proceeding.
Once the repository is set up, use the following commands:
$ yum install Percona-XtraDB-Cluster-56
More detailed example of the Percona XtraDB Cluster installation and configuration can be seen in Installing Percona XtraDB Cluster on CentOS tutorial.
In order for Percona XtraDB Cluster to work correctly firewall has to be set up to allow connections on the following ports: 3306, 4444, 4567 and 4568. Percona XtraDB Cluster currently doesn’t work with SELinux or apparmor so they should be disabled, otherwise individual nodes won’t be able to communicate and form the cluster.
In order to start using the Percona XtraDB Cluster, following options are needed in the MySQL configuration file my.cnf:
[mysqld] wsrep_provider — a path to Galera library. wsrep_cluster_address — Cluster connection URL containing the IPs of other nodes in the cluster wsrep_sst_method - method used for the state snapshot transfer binlog_format=ROW - In order for Galera to work correctly binlog format should be ROW default_storage_engine=InnoDB - MyISAM storage engine has only experimental support innodb_autoinc_lock_mode=2 - This changes how InnoDB autoincrement locks are managed
Additional parameters to specify:
wsrep_provider=/usr/lib64/libgalera_smm.so wsrep_cluster_address=gcomm://10.11.12.206 wsrep_slave_threads=8 wsrep_sst_method=rsync binlog_format=ROW default_storage_engine=InnoDB innodb_autoinc_lock_mode=2