280
by Stewart Smith
backport BUILD.txt fixes |
1 |
================================ |
2 |
How to build XtraBackup on Linux |
|
3 |
================================ |
|
4 |
||
5 |
Prerequisites |
|
6 |
------------- |
|
7 |
||
8 |
The following packages and tools must be installed to compile |
|
9 |
Percona XtraBackup from source. These might vary from system to system. |
|
10 |
||
11 |
In Debian-based distributions, you need to: |
|
12 |
||
13 |
$ apt-get install build-essential flex bison automake autoconf bzr \ |
|
14 |
libtool cmake libaio-dev mysql-client libncurses-dev zlib1g-dev |
|
15 |
||
16 |
In RPM-based distributions, you need to: |
|
17 |
||
18 |
$ yum install cmake gcc gcc-c++ libaio libaio-devel automake autoconf bzr \ |
|
19 |
bison libtool ncurses5-devel |
|
20 |
||
21 |
Compiling with build.sh |
|
22 |
----------------------- |
|
23 |
||
24 |
Once you have all dependencies met, the compilation is straight-forward with |
|
25 |
the bundled build.sh script in the utils/ directory of the distribution. |
|
26 |
||
27 |
The script needs the codebase for which the building is targeted, you must |
|
28 |
provide it with one of the following values or aliases: |
|
29 |
||
30 |
================== ========= ============================================= |
|
31 |
Value Alias Server |
|
32 |
================== ========= ============================================= |
|
33 |
innodb51_builtin 5.1 build against built-in InnoDB in MySQL 5.1 |
|
34 |
innodb51 plugin build agsinst InnoDB plugin in MySQL 5.1 |
|
35 |
innodb55 5.5 build against InnoDB in MySQL 5.5 |
|
36 |
xtradb51 xtradb build against Percona Server with XtraDB 5.1 |
|
37 |
xtradb55 xtradb55 build against Percona Server with XtraDB 5.5 |
|
38 |
================== ========= ============================================= |
|
39 |
||
40 |
Note that the script must be executed from the base directory of Xtrabackup |
|
41 |
sources, and that directory must contain the packages with the source code of |
|
42 |
the codebase selected. This may appear cumbersome, but if the variable |
|
43 |
AUTO_DOWNLOAD="yes" is set, the build.sh script will download all the source |
|
44 |
code needed for the build. |
|
45 |
||
46 |
At the base directory of the downloaded source code, if you execute |
|
47 |
||
48 |
$ AUTO_DOWNLOAD="yes" ./utils/build.sh xtradb |
|
49 |
||
50 |
and you go for a coffee, at your return XtraBackup will be ready to be used. |
|
51 |
The xtrabackup binary will located in the following subdirectory depending |
|
52 |
on the building target: |
|
53 |
||
54 |
================== ======================================================= |
|
55 |
Target Location |
|
56 |
================== ======================================================= |
|
57 |
innodb51_builtin mysql-5.1/storage/innobase/xtrabackup |
|
58 |
innodb51 mysql-5.1/storage/innodb_plugin/xtrabackup |
|
59 |
innodb55 mysql-5.5/storage/innobase/xtrabackup |
|
60 |
xtradb51 Percona-Server-5.1/storage/innodb_plugin/xtrabackup |
|
61 |
xtradb55 Percona-Server-5.5/storage/innobase/xtrabackup |
|
62 |
================== ======================================================= |