[root@localhost ~]# yum install perl-DBD-MySQL.x86_64 [root@localhost ~]# yum install perl-Time-HiRes.x86_64
3 rpm包安装及配置
下载rpm安装包:[root@localhost ~]# wget http://www.percona.com/downloads/XtraBackup/XtraBackup-2.2.3/binary/redhat/6/x86_64/percona-xtrabackup-2.2.3-4982.el6.x86_64.rpm安装rpm包:
[root@localhost ~]# rpm -ivh percona-xtrabackup-2.2.3-4982.el6.x86_64.rpm查看版本号:
[root@localhost ~]# xtrabackup --version xtrabackup version 2.2.3 based on MySQL server 5.6.17 Linux (x86_64) (revision id: )简单测试:
[root@localhost ~]# innobackupex --user=root --defaults-file=/etc/my.cnf --database=test /tmp安装成功!
[root@localhost ~]# rpm -qa | grep xtrabackup percona-xtrabackup-2.2.3-4982.el6.x86_64 [root@localhost ~]# rpm -e percona-xtrabackup-2.2.3-4982.el6.x86_644 二进制执行文件安装及配置
[root@localhost ~]# wget http://www.percona.com/downloads/XtraBackup/XtraBackup-2.2.3/binary/tarball/percona-xtrabackup-2.2.3-4982-Linux-x86_64.tar.gz解压安装包:
[root@localhost ~]# tar xzvf percona-xtrabackup-2.2.3-4982-Linux-x86_64.tar.gz查看版本号:
[root@localhost ~]# /root/percona-xtrabackup-2.2.3-Linux-x86_64/bin/innobackupex --version InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy and Percona LLC and/or its affiliates 2009-2013. All Rights Reserved.简单备份测试:
[root@localhost ~]# /root/percona-xtrabackup-2.2.3-Linux-x86_64/bin/innobackupex --user=root --defaults-file=/etc/my.cnf --database=test /tmp安装成功!
[root@localhost ~]# wget http://www.percona.com/downloads/XtraBackup/LATEST/source/tarball/percona-xtrabackup-2.2.6.tar.gz [root@localhost ~]# tar xzvf percona-xtrabackup-2.2.6.tar.gz [root@localhost ~]# cd percona-xtrabackup-2.2.65.2 通过bzr下载
[root@localhost ~]# yum install bzr [root@localhost ~]bzr branch lp:percona-xtrabackup/2.25.3 编译安装
[root@localhost ~]# yum install cmake libaio-devel ncurses-devel bzip2-devel libxml2-devel libgcrypt-devel开始编译
[root@localhost ~]# cmake -DBUILD_CONFIG=xtrabackup_release && make -j4默认安装
[root@localhost ~]# make install注:默认安装在/usr/local/xtrabackup/目录下
[root@localhost bin]# /usr/local/xtrabackup/bin/innobackupex --defaults-file=/etc/my.cnf --host=127.0.0.1 --port=3306 --user=root --password=****** --database=test /tmp指定目录安装:
[root@localhost ~]# make DESTDIR=/tmp/ install会安装在/tmp/usr/local/xtrabackup/目录下