安装依赖包:这些依赖包必须要先安装好
# yum install cmake libaio-devel ncurses-devel bzip2-devel libxml2-devel libgcrypt-devel
此外还要安装好cmake软件
开始编译:
# cd percona-xtrabackup-2.2.9 # cmake -DBUILD_CONFIG=xtrabackup_release -DWITH_BOOST=/usr/local/boost
# make -j4
在make操作这一步遇到了Sphinx没有安装的问题,导致make操作一直无法完成。
Linking CXX executable xtrabackup [ 78%] Built target xtrabackup [ 78%] Generating build/man /bin/sh: sphinx-build: command not found make[2]: *** [storage/innobase/xtrabackup/doc/source/build/man] Error 127 make[1]: *** [storage/innobase/xtrabackup/doc/source/CMakeFiles/man.dir/all] Error 2 make: *** [all] Error 2
通过以下方式安装Sphinx后,重新执行make命令
# easy_install Sphinx
默认安装:
# make install
注:
默认安装在/usr/local/xtrabackup/目录下
也可以指定目录安装:
# make DESTDIR=/usr/local/t install
简单备份测试:
# /usr/local/xtrabackup/bin/innobackupex --defaults-file=/etc/my.cnf --host=127.0.0.1 --port=3306 --user=root --password=****** --database=test /tmp