下载源码包
1.官网下载源码包或GitHub下载相关源码
git clone https://github.com/percona/percona-xtrabackup.git
cd percona-xtrabackup/
git checkout 2.4
2.安装相关依赖
yum -y install cmake gcc gcc-c++ libaio libaio-devel automake autoconf bison libtool ncurses-devel libgcrypt-devel libev-devel libcurl-devel vim-common
3.需要下载boost
mkdir -p /usr/local/boost
cd /usr/local/boost
wget http://www.sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.gz
tar -xvzf boost_1_59_0.tar.gz
4.编译安装
cd /usr/local/xtrabackup
cmake -DBUILD_CONFIG=xtrabackup_release -DWITH_MAN_PAGES=OFF -DWITH_BOOST=/usr/local/boost
make && make install
5.添加环境变量
echo "export PATH=$PATH:/usr/local/xtrabackup/bin" >> /etc/profile
source /etc/profile
ln -sf /usr/local/xtrabackup/bin/innobackupex /usr/bin/
ln -sf /usr/local/xtrabackup/bin/xtrabackup /usr/bin/
6.查看版本