Today we’re going to install Percona Server 5.5 on a CentOS 6.5 server. Our server is hosted on Amazon AWS but the procedure should be the same for any host.
Percona Server is a drop-in replacement for MySQL that features enhanced performance. You can learn more about Percona here:
http://www.percona.com/
We’re going to do our install using the Percona Yum repository. The documentation is here:
http://www.percona.com/doc/percona-server/5.5/installation/yum_repo.html
Lets get started by adding the repository. Run this command as root:
1 |
yum install http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm |
and you’ll get output similar to this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
Loaded plugins: fastestmirror, presto Determining fastest mirrors * base: mirror.san.fastserv.com * extras: mirror.evolvedservers.com * updates: mirror.wiredtree.com Setting up Install Process percona-release-0.1-3.noarch.rpm | 6.4 kB 00:00 Examining /var/tmp/yum-root-_Usihn/percona-release-0.1-3.noarch.rpm: percona-release-0.1-3.noarch Marking /var/tmp/yum-root-_Usihn/percona-release-0.1-3.noarch.rpm to be installed Resolving Dependencies --> Running transaction check ---> Package percona-release.noarch 0:0.1-3 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================================================================= Package Arch Version Repository Size ================================================================================================================================= Installing: percona-release noarch 0.1-3 /percona-release-0.1-3.noarch 5.8 k Transaction Summary ================================================================================================================================= Install 1 Package(s) Total size: 5.8 k Installed size: 5.8 k Is this ok [y/N]: y Downloading Packages: Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : percona-release-0.1-3.noarch 1/1 Verifying : percona-release-0.1-3.noarch 1/1 Installed: percona-release.noarch 0:0.1-3 Complete! |
Now if you run this command:
1 |
yum list | grep percona |
You’ll see a list of available packages like:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
percona-release.noarch 0.1-3 @/percona-release-0.1-3.noarch Percona-SQL-50-debuginfo.x86_64 5.0.92-b23.89.rhel6 percona-release-x86_64 Percona-SQL-client-50.x86_64 5.0.92-b23.89.rhel6 percona-release-x86_64 Percona-SQL-devel-50.x86_64 5.0.92-b23.89.rhel6 percona-release-x86_64 Percona-SQL-server-50.x86_64 5.0.92-b23.89.rhel6 percona-release-x86_64 Percona-SQL-shared-50.x86_64 5.0.92-b23.89.rhel6 percona-release-x86_64 Percona-SQL-shared-compat.x86_64 5.0.92-b23.89.rhel6 percona-release-x86_64 Percona-SQL-test-50.x86_64 5.0.92-b23.89.rhel6 percona-release-x86_64 Percona-Server-51-debuginfo.x86_64 5.1.73-rel14.12.624.rhel6 percona-release-x86_64 Percona-Server-55-debuginfo.x86_64 5.5.41-rel37.0.el6 percona-release-x86_64 Percona-Server-56-debuginfo.x86_64 5.6.22-rel71.0.el6 percona-release-x86_64 Percona-Server-client-51.x86_64 5.1.73-rel14.12.624.rhel6 percona-release-x86_64 Percona-Server-client-55.x86_64 5.5.41-rel37.0.el6 percona-release-x86_64 Percona-Server-client-56.x86_64 5.6.22-rel71.0.el6 percona-release-x86_64 Percona-Server-devel-51.x86_64 5.1.73-rel14.12.624.rhel6 percona-release-x86_64 Percona-Server-devel-55.x86_64 5.5.41-rel37.0.el6 percona-release-x86_64 Percona-Server-devel-56.x86_64 5.6.22-rel71.0.el6 percona-release-x86_64 Percona-Server-server-51.x86_64 5.1.73-rel14.12.624.rhel6 percona-release-x86_64 Percona-Server-server-55.x86_64 5.5.41-rel37.0.el6 percona-release-x86_64 Percona-Server-server-56.x86_64 5.6.22-rel71.0.el6 percona-release-x86_64 Percona-Server-shared-51.x86_64 5.1.73-rel14.12.624.rhel6 percona-release-x86_64 Percona-Server-shared-55.x86_64 5.5.41-rel37.0.el6 percona-release-x86_64 Percona-Server-shared-56.x86_64 5.6.22-rel71.0.el6 percona-release-x86_64 Percona-Server-shared-compat.x86_64 5.1.68-rel14.6.551.rhel6 percona-release-x86_64 Percona-Server-shared-compat-51.x86_64 5.1.73-rel14.12.624.rhel6 percona-release-x86_64 Percona-Server-test-51.x86_64 5.1.73-rel14.12.624.rhel6 percona-release-x86_64 Percona-Server-test-55.x86_64 5.5.41-rel37.0.el6 percona-release-x86_64 Percona-Server-test-56.x86_64 5.6.22-rel71.0.el6 percona-release-x86_64 Percona-Server-tokudb-56.x86_64 5.6.22-rel71.0.el6 percona-release-x86_64 Percona-XtraDB-Cluster-55.x86_64 1:5.5.39-25.11.824.el6 percona-release-x86_64 Percona-XtraDB-Cluster-55-debuginfo.x86_64 1:5.5.39-25.11.824.el6 percona-release-x86_64 Percona-XtraDB-Cluster-56.x86_64 1:5.6.21-25.8.938.el6 percona-release-x86_64 Percona-XtraDB-Cluster-56-debuginfo.x86_64 1:5.6.21-25.8.938.el6 percona-release-x86_64 Percona-XtraDB-Cluster-client.x86_64 1:5.5.34-23.7.6.565.rhel6 percona-release-x86_64 Percona-XtraDB-Cluster-client-55.x86_64 1:5.5.39-25.11.824.el6 percona-release-x86_64 Percona-XtraDB-Cluster-client-56.x86_64 1:5.6.21-25.8.938.el6 percona-release-x86_64 Percona-XtraDB-Cluster-debuginfo.x86_64 1:5.5.34-23.7.6.565.rhel6 percona-release-x86_64 Percona-XtraDB-Cluster-devel.x86_64 1:5.5.34-23.7.6.565.rhel6 percona-release-x86_64 Percona-XtraDB-Cluster-devel-55.x86_64 1:5.5.39-25.11.824.el6 percona-release-x86_64 Percona-XtraDB-Cluster-devel-56.x86_64 1:5.6.21-25.8.938.el6 percona-release-x86_64 Percona-XtraDB-Cluster-full-55.x86_64 1:5.5.39-25.11.824.el6 percona-release-x86_64 Percona-XtraDB-Cluster-full-56.x86_64 1:5.6.21-25.8.938.el6 percona-release-x86_64 Percona-XtraDB-Cluster-galera.x86_64 2.8-1.162.rhel6 percona-release-x86_64 Percona-XtraDB-Cluster-galera-2.x86_64 2.11-1.2675.rhel6 percona-release-x86_64 2.11-1.2675.rhel6 percona-release-x86_64 Percona-XtraDB-Cluster-galera-3.x86_64 3.8-1.3390.rhel6 percona-release-x86_64 3.8-1.3390.rhel6 percona-release-x86_64 Percona-XtraDB-Cluster-galera-56.x86_64 3.1-1.169.rhel6 percona-release-x86_64 3.1-1.169.rhel6 percona-release-x86_64 2.8-1.162.rhel6 percona-release-x86_64 Percona-XtraDB-Cluster-garbd-2.x86_64 2.11-1.2675.rhel6 percona-release-x86_64 Percona-XtraDB-Cluster-garbd-3.x86_64 3.8-1.3390.rhel6 percona-release-x86_64 Percona-XtraDB-Cluster-server.x86_64 1:5.5.34-23.7.6.565.rhel6 percona-release-x86_64 Percona-XtraDB-Cluster-server-55.x86_64 1:5.5.39-25.11.824.el6 percona-release-x86_64 Percona-XtraDB-Cluster-server-56.x86_64 1:5.6.21-25.8.938.el6 percona-release-x86_64 Percona-XtraDB-Cluster-shared.x86_64 1:5.5.34-23.7.6.565.rhel6 percona-release-x86_64 Percona-XtraDB-Cluster-shared-55.x86_64 1:5.5.39-25.11.824.el6 percona-release-x86_64 Percona-XtraDB-Cluster-shared-56.x86_64 1:5.6.21-25.8.938.el6 percona-release-x86_64 Percona-XtraDB-Cluster-test.x86_64 1:5.5.34-23.7.6.565.rhel6 percona-release-x86_64 Percona-XtraDB-Cluster-test-55.x86_64 1:5.5.39-25.11.824.el6 percona-release-x86_64 Percona-XtraDB-Cluster-test-56.x86_64 1:5.6.21-25.8.938.el6 percona-release-x86_64 jemalloc.x86_64 3.3.1-1.el6 percona-release-x86_64 jemalloc-devel.x86_64 3.3.1-1.el6 percona-release-x86_64 percona-agent.x86_64 1.0.10-1.el6 percona-release-x86_64 percona-cacti-templates.noarch 1.1.4-1 percona-release-noarch percona-nagios-plugins.noarch 1.1.4-1 percona-release-noarch percona-playback.x86_64 0.7-2.el6 percona-release-x86_64 percona-playback-debuginfo.x86_64 0.7-2.el6 percona-release-x86_64 percona-playback-devel.x86_64 0.7-2.el6 percona-release-x86_64 percona-toolkit.noarch 2.2.12-1 percona-release-noarch percona-xtrabackup.x86_64 2.2.8-5059.el6 percona-release-x86_64 percona-xtrabackup-20.x86_64 2.0.8-587.rhel6 percona-release-x86_64 percona-xtrabackup-20-debuginfo.x86_64 2.0.8-587.rhel6 percona-release-x86_64 percona-xtrabackup-20-test.x86_64 2.0.8-587.rhel6 percona-release-x86_64 percona-xtrabackup-21.x86_64 2.1.9-746.rhel6 percona-release-x86_64 percona-xtrabackup-21-debuginfo.x86_64 2.1.9-746.rhel6 percona-release-x86_64 percona-xtrabackup-debuginfo.x86_64 2.2.8-5059.el6 percona-release-x86_64 percona-xtrabackup-test.x86_64 2.2.8-5059.el6 percona-release-x86_64 percona-xtrabackup-test-21.x86_64 2.1.9-746.rhel6 percona-release-x86_64 percona-zabbix-templates.noarch 1.1.4-1 percona-release-noarch qpress.x86_64 11-1.el6 percona-release-x86_64 qpress-debuginfo.x86_64 11-1.el6 percona-release-x86_64 sysbench.x86_64 0.5-6.el6 percona-release-x86_64 sysbench-debuginfo.x86_64 0.5-6.el6 percona-release-x86_64 |
Since our goal is to install Percona 5.5, we’ll do the following:
1 |
yum install Percona-Server-server-55 |
The install proceeds like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
Loaded plugins: fastestmirror, presto Loading mirror speeds from cached hostfile * base: mirror.san.fastserv.com * extras: mirror.evolvedservers.com * updates: mirror.wiredtree.com Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package Percona-Server-server-55.x86_64 0:5.5.41-rel37.0.el6 will be installed --> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: Percona-Server-server-55-5.5.41-rel37.0.el6.x86_64 --> Processing Dependency: /usr/bin/perl for package: Percona-Server-server-55-5.5.41-rel37.0.el6.x86_64 --> Processing Dependency: perl(Data::Dumper) for package: Percona-Server-server-55-5.5.41-rel37.0.el6.x86_64 --> Processing Dependency: Percona-Server-shared-55 for package: Percona-Server-server-55-5.5.41-rel37.0.el6.x86_64 --> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: Percona-Server-server-55-5.5.41-rel37.0.el6.x86_64 --> Processing Dependency: Percona-Server-client-55 for package: Percona-Server-server-55-5.5.41-rel37.0.el6.x86_64 --> Processing Dependency: libaio.so.1()(64bit) for package: Percona-Server-server-55-5.5.41-rel37.0.el6.x86_64 --> Running transaction check ---> Package Percona-Server-client-55.x86_64 0:5.5.41-rel37.0.el6 will be installed ---> Package Percona-Server-shared-55.x86_64 0:5.5.41-rel37.0.el6 will be installed ---> Package libaio.x86_64 0:0.3.107-10.el6 will be installed ---> Package perl.x86_64 4:5.10.1-136.el6_6.1 will be installed --> Processing Dependency: perl-libs = 4:5.10.1-136.el6_6.1 for package: 4:perl-5.10.1-136.el6_6.1.x86_64 --> Processing Dependency: perl-libs for package: 4:perl-5.10.1-136.el6_6.1.x86_64 --> Processing Dependency: perl(version) for package: 4:perl-5.10.1-136.el6_6.1.x86_64 --> Processing Dependency: perl(Pod::Simple) for package: 4:perl-5.10.1-136.el6_6.1.x86_64 --> Processing Dependency: perl(Module::Pluggable) for package: 4:perl-5.10.1-136.el6_6.1.x86_64 --> Processing Dependency: libperl.so()(64bit) for package: 4:perl-5.10.1-136.el6_6.1.x86_64 --> Running transaction check ---> Package perl-Module-Pluggable.x86_64 1:3.90-136.el6_6.1 will be installed ---> Package perl-Pod-Simple.x86_64 1:3.13-136.el6_6.1 will be installed --> Processing Dependency: perl(Pod::Escapes) >= 1.04 for package: 1:perl-Pod-Simple-3.13-136.el6_6.1.x86_64 ---> Package perl-libs.x86_64 4:5.10.1-136.el6_6.1 will be installed ---> Package perl-version.x86_64 3:0.77-136.el6_6.1 will be installed --> Running transaction check ---> Package perl-Pod-Escapes.x86_64 1:1.04-136.el6_6.1 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================================================================= Package Arch Version Repository Size ================================================================================================================================= Installing: Percona-Server-server-55 x86_64 5.5.41-rel37.0.el6 percona-release-x86_64 15 M Installing for dependencies: Percona-Server-client-55 x86_64 5.5.41-rel37.0.el6 percona-release-x86_64 5.9 M Percona-Server-shared-55 x86_64 5.5.41-rel37.0.el6 percona-release-x86_64 648 k libaio x86_64 0.3.107-10.el6 base 21 k perl x86_64 4:5.10.1-136.el6_6.1 updates 10 M perl-Module-Pluggable x86_64 1:3.90-136.el6_6.1 updates 40 k perl-Pod-Escapes x86_64 1:1.04-136.el6_6.1 updates 32 k perl-Pod-Simple x86_64 1:3.13-136.el6_6.1 updates 212 k perl-libs x86_64 4:5.10.1-136.el6_6.1 updates 578 k perl-version x86_64 3:0.77-136.el6_6.1 updates 51 k Transaction Summary ================================================================================================================================= Install 10 Package(s) Total download size: 33 M Installed size: 133 M Is this ok [y/N]: y Downloading Packages: Setting up and reading Presto delta metadata updates/prestodelta | 158 kB 00:00 Processing delta metadata Package(s) data still to download: 33 M (1/10): Percona-Server-client-55-5.5.41-rel37.0.el6.x86_64.rpm | 5.9 MB 00:01 (2/10): Percona-Server-server-55-5.5.41-rel37.0.el6.x86_64.rpm | 15 MB 00:00 (3/10): Percona-Server-shared-55-5.5.41-rel37.0.el6.x86_64.rpm | 648 kB 00:00 http://mirror.san.fastserv.com/pub/linux/centos/6.6/os/x86_64/Packages/libaio-0.3.107-10.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 18 - "transfer closed with 21708 bytes remaining to read" Trying other mirror. (4/10): libaio-0.3.107-10.el6.x86_64.rpm | 21 kB 00:00 (5/10): perl-5.10.1-136.el6_6.1.x86_64.rpm | 10 MB 00:07 (6/10): perl-Module-Pluggable-3.90-136.el6_6.1.x86_64.rpm | 40 kB 00:00 (7/10): perl-Pod-Escapes-1.04-136.el6_6.1.x86_64.rpm | 32 kB 00:00 (8/10): perl-Pod-Simple-3.13-136.el6_6.1.x86_64.rpm | 212 kB 00:00 (9/10): perl-libs-5.10.1-136.el6_6.1.x86_64.rpm | 578 kB 00:00 (10/10): perl-version-0.77-136.el6_6.1.x86_64.rpm | 51 kB 00:00 --------------------------------------------------------------------------------------------------------------------------------- Total 2.7 MB/s | 33 MB 00:11 warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 Importing GPG key 0xC105B9DE: Userid : CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org> Package: centos-release-6-5.el6.centos.11.1.x86_64 (@CentOS6-Base/$releasever) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 Is this ok [y/N]: y warning: rpmts_HdrFromFdno: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Percona Importing GPG key 0xCD2EFD2A: Userid : Percona MySQL Development Team <mysql-dev@percona.com> Package: percona-release-0.1-3.noarch (@/percona-release-0.1-3.noarch) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-Percona Is this ok [y/N]: y Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : Percona-Server-shared-55-5.5.41-rel37.0.el6.x86_64 1/10 Installing : 1:perl-Pod-Escapes-1.04-136.el6_6.1.x86_64 2/10 Installing : 1:perl-Module-Pluggable-3.90-136.el6_6.1.x86_64 3/10 Installing : 4:perl-libs-5.10.1-136.el6_6.1.x86_64 4/10 Installing : 1:perl-Pod-Simple-3.13-136.el6_6.1.x86_64 5/10 Installing : 3:perl-version-0.77-136.el6_6.1.x86_64 6/10 Installing : 4:perl-5.10.1-136.el6_6.1.x86_64 7/10 Installing : Percona-Server-client-55-5.5.41-rel37.0.el6.x86_64 8/10 Installing : libaio-0.3.107-10.el6.x86_64 9/10 Installing : Percona-Server-server-55-5.5.41-rel37.0.el6.x86_64 10/10 Error in my_thread_global_end(): 1 threads didn't exit Error in my_thread_global_end(): 1 threads didn't exit PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: /usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h ip-10-1-1-10 password 'new-password' Alternatively you can run: /usr/bin/mysql_secure_installation which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers. See the manual for more instructions. Please report any problems at https://bugs.launchpad.net/percona-server/+filebug Percona recommends that all production deployments be protected with a support contract (http://www.percona.com/mysql-suppport/) to ensure the highest uptime, be eligible for hot fixes, and boost your team's productivity. Percona Server is distributed with several useful UDF (User Defined Function) from Percona Toolkit. Run the following commands to create these functions: mysql -e "CREATE FUNCTION fnv1a_64 RETURNS INTEGER SONAME 'libfnv1a_udf.so'" mysql -e "CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME 'libfnv_udf.so'" mysql -e "CREATE FUNCTION murmur_hash RETURNS INTEGER SONAME 'libmurmur_udf.so'" See http://www.percona.com/doc/percona-server/5.5/management/udf_percona_toolkit.html for more details Verifying : 3:perl-version-0.77-136.el6_6.1.x86_64 1/10 Verifying : 1:perl-Pod-Simple-3.13-136.el6_6.1.x86_64 2/10 Verifying : 1:perl-Module-Pluggable-3.90-136.el6_6.1.x86_64 3/10 Verifying : Percona-Server-shared-55-5.5.41-rel37.0.el6.x86_64 4/10 Verifying : 4:perl-5.10.1-136.el6_6.1.x86_64 5/10 Verifying : 4:perl-libs-5.10.1-136.el6_6.1.x86_64 6/10 Verifying : Percona-Server-client-55-5.5.41-rel37.0.el6.x86_64 7/10 Verifying : libaio-0.3.107-10.el6.x86_64 8/10 Verifying : Percona-Server-server-55-5.5.41-rel37.0.el6.x86_64 9/10 Verifying : 1:perl-Pod-Escapes-1.04-136.el6_6.1.x86_64 10/10 Installed: Percona-Server-server-55.x86_64 0:5.5.41-rel37.0.el6 Dependency Installed: Percona-Server-client-55.x86_64 0:5.5.41-rel37.0.el6 Percona-Server-shared-55.x86_64 0:5.5.41-rel37.0.el6 libaio.x86_64 0:0.3.107-10.el6 perl.x86_64 4:5.10.1-136.el6_6.1 perl-Module-Pluggable.x86_64 1:3.90-136.el6_6.1 perl-Pod-Escapes.x86_64 1:1.04-136.el6_6.1 perl-Pod-Simple.x86_64 1:3.13-136.el6_6.1 perl-libs.x86_64 4:5.10.1-136.el6_6.1 perl-version.x86_64 3:0.77-136.el6_6.1 Complete! |
As you can see a number of supporting packages were also installed.
Next let’s configure Percona to start on boot:
1 |
/sbin/chkconfig --level 345 mysql on |
And run it for the first time:
1 |
/sbin/service mysql start |
which should give some output like:
1 |
Starting MySQL (Percona Server).. SUCCESS! |
Notice that the service name for Percona is “mysql” instead of “mysqld” which is used by MySQL.
At this point the Percona Server 5.5 install has been completed.