----1.编译安装percona-xtrabackupyum -y install cmake gcc gcc-c++ libaio libaio-devel automake autoconf bzr \bison libtool ncurses-devel ncurses5-devel zlib-devel libgcrypt-devel crypt* libgcrypt* \python-sphinx openssl imake libxml2-devel expat-devel ncurses5-devel ncurses-devleNOTE:2.2.14 须要python-sphinx openssl两个依赖包. ---2.安装相关插件yum -y install perl-DBIyum -y install perl-DBD-MySQLyum -y install perl-Time-HiResyum -y install perl-IO-Socket-SSLwget http://www.percona.com/downloads/percona-toolkit/2.2.14/RPM/percona-toolkit-2.2.13-1.noarch.rpmyum -y install mysql-libs#相应版本号的MySQL-shared-compatrpm -ivh MySQL-shared-compat-5.6.25-1.el6.x86_64.rpm yum -y install perl-TermReadKeyrpm -ivh percona-toolkit-2.2.14-1.noarch.rpm ---3.安装xtrabackupwget http://www.percona.com/downloads/XtraBackup/XtraBackup-2.2.11/source/tarball/percona-xtrabackup-2.2.11.tar.gzcd /soft/rm -rf /usr/local/xtrabackupmkdir -p /usr/local/xtrabackuptar xvzf percona-xtrabackup-2.2.11.tar.gz mv percona-xtrabackup-2.2.11 /usr/local/xtrabackupchown -R mysql:mysql /usr/local/xtrabackupcd /usr/local/xtrabackup/percona-xtrabackup-2.2.11cmake -DBUILD_CONFIG=xtrabackup_release /**************编译安装相关參数cmake . -LH --查看cmake支持的mysql相关參数shell> cmake . -L # overviewshell> cmake . -LH # overview with help textshell> cmake . -LAH # all params with help textshell> cmake . # interactive display******************make ********************make可能遇到的错误又一次编译时。须要清除旧的对象文件和缓存信息Could not import extension sphinx.ext.extlinks (exception: No module named extlinks)make cleanrm -f CMakeCache.txt******************make install/*****又一次安装须要rm -rf /usr/bin/innobackupexrm -rf /usr/bin/xtrabackup***********/#vi + ~/.bash_profileexport PATH=/usr/local/xtrabackup/bin:$PATH#source ~/.bash_profile----链接命令到/usr/bin文件夹ln -sf /usr/local/xtrabackup/bin/* /usr/bin/