You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before you begin, make sure that the following packages are installed:
6
-
7
-
|| apt| yum|
8
-
| --- | ----- | --- |
9
-
| Git|`git`|`git`|
10
-
| SCons |`scons`|`scons`|
11
-
| GCC|`gcc`|`gcc`|
12
-
| g++ |`g++`|`gcc-c++`|
13
-
| OpenSSL|`openssl`|`openssl`|
14
-
| Check|`check`|`check`|
15
-
| CMake|`cmake`|`cmake`|
16
-
| Bison|`bison`|`bison`|
17
-
| Boost |`libboost-all-dev`|`boost-devel`|
18
-
| Asio|`libasio-dev`|`asio-devel`|
19
-
| Async I/O|`libaio-dev`|`libaio-devel`|
20
-
| ncurses |`libncurses5-dev`|`ncurses-devel`|
21
-
| Readline|`libreadline-dev`|`readline-devel`|
22
-
| PAM |`libpam-dev`|`pam-devel`|
23
-
| socat|`socat`|`socat`|
24
-
| curl |`libcurl-dev`|`libcurl-devel`|
25
-
26
-
## Check packages
27
-
28
-
You may have already installed most of the packages. Run one of the following commands to install any missing
29
-
dependencies:
3
+
For routine deployments, prefer [official packages or a binary tarball](tarball.md). Follow this page to compile Percona XtraDB Cluster when you package it yourself, ship custom patches, or develop the server locally.
4
+
5
+
Clone the source from [GitHub :octicons-link-external-16:](https://github.com/percona/percona-xtradb-cluster), then install the build packages in the table.
The glibc (GNU C Library) version can differ across software builds due to several key factors:
48
+
Percona XtraBackup tarballs encode glibc in the filename as `glibc2.xx`. Replace that token with the suffix from your actual file (for example `glibc2.28`). Choose archives built for the glibc you compile and run against. Inspect the library version with:
| Operating system variation | When you build software on different Linux distributions or versions, each may ship with a different default glibc version. For example, Red Hat Enterprise Linux or Ubuntu might have distinct system library versions that impact compilation. |
54
-
| Backward compatibility considerations | Some applications are compiled to support multiple glibc versions. <br> - Developers often create builds that can run on older systems. <br> - This means intentionally targeting a slightly older glibc version for wider compatibility. |
55
-
| System architecture differences | 32-bit and 64-bit systems might require different glibc implementations. <br> - ARM, x86, and other processor architectures can have unique library requirements. |
56
-
| Security and patch levels | Distributions backport security patches at different rates. <br> - A system's glibc version reflects its current security update status. <br> - Critical security updates can prompt version changes. |
57
-
| Compilation environment | The specific development environment and build tools used can directly influence which glibc version gets linked during compilation. Container environments, cross-compilation setups, and build servers might have unique library configurations. |
50
+
```shell
51
+
ldd --version
52
+
```
58
53
59
-
Practical Tip: Use `ldd --version` to check your current glibc version and understand potential compatibility constraints in your software ecosystem.
54
+
When build hosts and deployment hosts differ, keep the CPU architecture aligned and match glibc, or compile on a host that mirrors production.
60
55
61
56
## Compile
62
57
63
-
To compile Percona XtraDB Cluster from source code:
58
+
Compile Percona XtraDB Cluster from source:
64
59
{.power-number}
65
60
66
-
1. Clone the latest repository or update it to the latest state. The old codebase may not be compatible with the build script. Clone the Percona XtraDB Cluster repository:
61
+
1. Clone a fresh tree—stale checkouts can break the build scripts:
2. Check out the `{{vers}}` branch and initialize submodules:
67
+
2. Check out the `{{vers}}` branch and pull submodules:
73
68
74
69
```shell
75
70
cd percona-xtradb-cluster
@@ -78,34 +73,55 @@ To compile Percona XtraDB Cluster from source code:
78
73
```
79
74
80
75
81
-
3. Download **both**Percona XtraBackup {{vers}} and Percona XtraBackup 8.0 tarballs (*.tar.gz) for your operating system from [Percona Software Downloads :octicons-link-external-16:](https://www.percona.com/downloads/).
76
+
3. Fetch Percona XtraBackup {{vers}} and Percona XtraBackup 8.4 `*.tar.gz` files for your OS from [Percona Software Downloads :octicons-link-external-16:](https://www.percona.com/downloads/).
82
77
83
-
Both XtraBackup versions are required:
78
+
Git omits XtraBackup binaries;`build-binary.sh` copies them from `pxc-build/pxc_extra`. It expects two distinct install trees under fixed names—`pxb-{{vers_major}}`for backup and restore tooling, `pxb-8.4`for State Snapshot Transfer (SST):
84
79
85
-
* Percona XtraBackup {{vers}} is used for backup and restore operations
86
-
* Percona XtraBackup 8.0 is required for State Snapshot Transfer (SST)
80
+
* Percona XtraBackup {{vers}} backs up and restores data through the integrated tooling.
87
81
88
-
Extract the tarballs into the `pxc-build/pxc_extra` directory and ensure the directories are named exactly as shown below:
82
+
* Percona XtraBackup 8.4 drives SST.
83
+
84
+
You need two separate directory trees, not always two different releases. When one build satisfies both roles (same version, glibc, and architecture), unpack once, then duplicate the folder so both `pxb-*` paths exist, or run the extract steps twice against the same archive.
85
+
86
+
The shell snippets assume `Linux-x86_64`. On ARM64, substitute filenames that match your CPU (`aarch64`, `arm64`, and so on);do not reuse paths that do not match your downloads.
87
+
88
+
Unpack into `pxc-build/pxc_extra` and rename directories to match the `mv` targets in the example block. Swap `glibc2.xx`for the segment from each tarball name. Swap `8.4.x`for the version string on the XtraBackup 8.4 file (for example `8.4.0-3`). Point `tar` and `mv` at the real top-level directory each archive creates.
89
89
90
90
```shell
91
91
mkdir -p ./pxc-build/pxc_extra
92
92
93
93
tar -xvf percona-xtrabackup-{{vers}}-Linux-x86_64.glibc2.xx.tar.gz -C ./pxc-build
4. Run the build script `./build-ps/build-binary.sh`. By default, it attempts to build into the current directory. Specify the target output directory, such as `./pxc-build`:
100
+
4. Invoke `./build-ps/build-binary.sh` with an explicit output directory (it defaults to the current directory):
101
101
102
102
```shell
103
-
mkdir ./pxc-build
103
+
mkdir -p ./pxc-build
104
104
./build-ps/build-binary.sh ./pxc-build
105
105
```
106
106
107
-
When the compilation completes, `pxc-build`contains a tarball, such as `Percona-XtraBackup-{{vers}}.tar.gz`, that you can deploy on your system.
107
+
On success, `pxc-build`holds a new archive named like `Percona-XtraDB-Cluster_<version-number>-Linux.x86_64.glibc2.xx.tar.gz` (full and minimal builds may both appear). Read `<version-number>` and `glibc2.xx` from the filename the script emits.
108
108
109
109
!!! note
110
110
111
-
The exact version and release numbers may differ.
111
+
Published version strings, glibc tags, and archive names vary by release.
112
+
113
+
## Install and next steps
114
+
115
+
Your artifact matches a [binary tarball](tarball.md#install-from-binary-tarball): one base directory bundles binaries, libraries, and support files, as summarized in the version and archive table on that page.
116
+
117
+
1. Unpack it on every node at the path you will treat as `basedir`.
118
+
119
+
2. Layer in runtime OS packages from the Debian, Ubuntu, or Red Hat lists in [Install from Binary Tarball](tarball.md).
120
+
121
+
3. Create `datadir` and a MySQL option file, point `basedir` and `datadir` at your paths, and layer [Galera and cluster settings](configure-nodes.md#configure-nodes-for-write-set-replication) into the file.
122
+
123
+
4. Initialize the data directory before the first boot (for example `./bin/mysqld --initialize` from the unpacked tree, using the account and permissions your policy requires).
124
+
125
+
5. Start the cluster: [bootstrap the first node](bootstrap.md#bootstrap-the-first-node), then [join the rest](add-node.md#add-nodes-to-cluster).
126
+
127
+
Most tutorials assume RPM/DEB paths under `/usr` and `systemctl`. Tarball and hand-built trees live elsewhere, yet the same `wsrep` flow applies. For the full picture, read [Get started with Percona XtraDB Cluster](get-started-cluster.md#get-started-with-percona-xtradb-cluster) and [Install Percona XtraDB Cluster](install-index.md#install-percona-xtradb-cluster).
0 commit comments