日期:2014-05-16  浏览次数:20439 次

percona XTRADB Cluster 5.6在ubuntu安装

installing-perconaXTRADB Cluster 5.6

in-ubuntu-13-10-wheezy

 

First of all, I would recommend login as root so that you don’t have tosudo every time you hit the command and give the root password.

1.  $ su -  

$ su -

Now you should be logged in as root. Mine now is

1.  root@rajug:~#  

root@rajug:~#

Step 1:
First of all lets remove everything that is related to MySQL from the machine.

1.  apt-get remove mysql*  

2.  apt-get purge mysql*  

3.  apt-get autoremove  

apt-get remove mysql*

apt-get purge mysql*

apt-get autoremeve

Step 2: Adding the key
Now lets add the key that is provided by Percona, we have to add this to beallowed to install from Percona server.

1.  apt-key adv --keyserver keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A  

apt-key adv --keyserverkeys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A

Step 3: Adding the repository
Lets add the Percona repository in the sources list in the machine/Ubuntu.

1.  vim /etc/apt/sources.list  

vim /etc/apt/sources.list

Add the following two lines in the source list:

http://repo.percona.com/apt/dists/

1.  deb http://repo.percona.com/apt wheezy main  

2.  deb-src http://repo.percona.com/apt wheezy main  

deb http://repo.percona.com/aptsaucy main

deb-srchttp://repo.percona.com/apt saucy main

Step 4: Apt-Pinning the packages
In some cases you might need to “pin” the selected packages to avoid theupgrades from the distribution repositories. You’ll need to make a new file/etc/apt/preferences.d/00percona.pref and add the following lines in it:

1.  vim /etc/apt/preferences.d/00percona.pref  

vim/etc/apt/preferences.d/00percona.pref

Add the following line:

1.  Package: *   

2.  Pin: release o=Percona Development Team  

3.  Pin-Priority: 1001  

Package: *

Pin: release o=PerconaDevelopment Team

Pin-Priority: 1001

Step 5: Update

1.  $apt-get update  

$apt-get update

Step 6: Install Percona Server and Client

1.  $ sudo apt-ge