CentoS 6.X安装xtrabackup 2.2.13

作为一线运维或者DBA对数据备份绝对不会陌生,MysqLdump、xtrabackup等常见备份姿势更是非常熟悉,还有很多商业备份工具以及其他的开源备份工具,所谓的冷备、热备、增量备份什么的,各种名词直接晃悠的你头疼。接下来跟着我继续踩一遍软件安装的坑吧。

操作系统:CentoS 6.7

Xtrabackup版本:2.2.13

MysqL版本:5.6.30

官网文档:https://www.percona.com/doc/percona-xtrabackup/2.2/installation/yum_repo.html

常见的安装方式有源码包和yum以及RPM等方式,源码编译什么比较麻烦,rpm包安装可能会出现依赖性的问题,本文中刚开始选择了用yum的方式,


1、Install the Percona repository

yuminstallhttp://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm


2、Testing the repository

Make sure packages are now available from the repository,by executing the following command:

yumlist|greppercona

You should see output similar to the following:

...
percona-xtrabackup-20.x86_642.0.8-587.rhel5percona-release-x86_64
percona-xtrabackup-20-debuginfo.x86_642.0.8-587.rhel5percona-release-x86_64
percona-xtrabackup-20-test.x86_642.0.8-587.rhel5percona-release-x86_64
percona-xtrabackup-21.x86_642.1.9-746.rhel5percona-release-x86_64
percona-xtrabackup-21-debuginfo.x86_642.1.9-746.rhel5percona-release-x86_64
percona-xtrabackup-22.x86_642.2.13-1.el5percona-release-x86_64
percona-xtrabackup-22-debuginfo.x86_642.2.13-1.el5percona-release-x86_64
percona-xtrabackup-debuginfo.x86_642.3.2-1.el5percona-release-x86_64
percona-xtrabackup-test.x86_642.3.2-1.el5percona-release-x86_64
percona-xtrabackup-test-21.x86_642.1.9-746.rhel5percona-release-x86_64
percona-xtrabackup-test-22.x86_642.2.13-1.el5percona-release-x86_64

3、install the packages

You can now installPercona XtraBackupby running:

yuminstallpercona-xtrabackup-22

根据文档配置yum源,然后开始安装软件,下载什么很慢,并且出现以下报错,于是我们就采取下载文件的方式

Totalsize:19M
Totaldownloadsize:4.8M
Isthisok[y/N]:y
DownloadingPackages:
http://repo.percona.com/release/6/RPMS/x86_64/percona-xtrabackup-22-2.2.13-1.el6.x86_64.rpm:[Errno14]PYCURLERROR18-"transferclosedwith884350bytesremainingtoread"
Tryingothermirror.


ErrorDownloadingPackages:
percona-xtrabackup-22-2.2.13-1.el6.x86_64:failure:percona-xtrabackup-22-2.2.13-1.el6.x86_64.rpmfrompercona-release-x86_64:[Errno256]Nomoremirrorstotry.

4、使用wget下载文件 用rpm安装

wget
root@username1-pc~]#rpm-ivhpercona-xtrabackup-22-2.2.13-1.el6.x86_64.rpm
warning:percona-xtrabackup-22-2.2.13-1.el6.x86_64.rpm:HeaderV4DSA/SHA1Signature,keyIDcd2efd2a:NOKEY
error:Faileddependencies:
	perl(DBD::MysqL)isneededbypercona-xtrabackup-22-2.2.13-1.el6.x86_64
	perl(Time::HiRes)isneededbypercona-xtrabackup-22-2.2.13-1.el6.x86_64
percona-xtrabackup-22x86_642.2.13-1.el6percona-release-x86_644.8M
Installingfordependencies:
Percona-Server-shared-51x86_645.1.73-rel14.12.625.rhel6percona-release-x86_642.1M
perl-DBD-MysqLx86_644.013-3.el6base134k
perl-Time-HiResx86_644:1.9721-144.el6base49k
Updatingfordependencies:
perlx86_644:5.10.1-144.el6base10M
perl-Compress-Raw-Zlibx86_641:2.021-144.el6base70k
perl-Compress-Zlibx86_642.021-144.el6base46k
perl-IO-Compress-Basex86_642.021-144.el6base70k
perl-IO-Compress-Zlibx86_642.021-144.el6base136k
perl-Module-Pluggablex86_641:3.90-144.el6base41k
perl-Pod-Escapesx86_641:1.04-144.el6base33k
perl-Pod-Simplex86_641:3.13-144.el6base213k
perl-libsx86_644:5.10.1-144.el6base579k
perl-versionx86_643:0.77-144.el6base52k

在rpm包安装的时候出现依赖报错,我们检查了yum安装的时候出现的依赖软件包,根据提示安装相关的软件即可,例如:

yuminstall-yperl-DBD-MysqLperl-Time-HiRes

再执行rpm安装命令

rpm-ivhpercona-xtrabackup-22-2.2.13-1.el6.x86_64.rpm

安装成功,就可以备份测试了!

相关文章

有时候CentOS工作在无互联网的环境下,需要在离线环境下安装一些组件,这次实现的是模拟在离线环境下安...
首先参照https://www.cnblogs.com/wdw984/p/13330074.html,来进行如何安装Centos和离线下载rpm包。 离...
有两个.NET CORE3.1网站部署在CentOS7上(内网IP是192.168.2.32),现在想实现访问http://192.168.2.32...
1、yum -y install vsftpd 安装vsftpd 2、配置vsftpd的配置文件(/etc/vsftpd/vsftpd.conf)主要修改以...
首先去mysql官网下载mysql的离线rpm安装包(https://downloads.mysql.com/archives/community/) Mysql...
第一步下载erlang环境并安装: wget https://packages.erlang-solutions.com/erlang/rpm/centos/7/x86_...