文章详情

短信预约-IT技能 免费直播动态提醒

请输入下面的图形验证码

提交验证

短信预约提醒成功

CentoS 6.X安装xtrabackup 2.2.13

2024-04-02 19:55

关注

   作为一线运维或者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

yum install http://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:

yum list | grep percona

You should see output similar to the following:

...
percona-xtrabackup-20.x86_64               2.0.8-587.rhel5             percona-release-x86_64
percona-xtrabackup-20-debuginfo.x86_64     2.0.8-587.rhel5             percona-release-x86_64
percona-xtrabackup-20-test.x86_64          2.0.8-587.rhel5             percona-release-x86_64
percona-xtrabackup-21.x86_64               2.1.9-746.rhel5             percona-release-x86_64
percona-xtrabackup-21-debuginfo.x86_64     2.1.9-746.rhel5             percona-release-x86_64
percona-xtrabackup-22.x86_64               2.2.13-1.el5                percona-release-x86_64
percona-xtrabackup-22-debuginfo.x86_64     2.2.13-1.el5                percona-release-x86_64
percona-xtrabackup-debuginfo.x86_64        2.3.2-1.el5                 percona-release-x86_64
percona-xtrabackup-test.x86_64             2.3.2-1.el5                 percona-release-x86_64
percona-xtrabackup-test-21.x86_64          2.1.9-746.rhel5             percona-release-x86_64
percona-xtrabackup-test-22.x86_64          2.2.13-1.el5                percona-release-x86_64

3、install the packages

You can now install Percona XtraBackup by running:

yum install percona-xtrabackup-22

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

Total size: 19 M
Total download size: 4.8 M
Is this ok [y/N]: y
Downloading Packages:
http://repo.percona.com/release/6/RPMS/x86_64/percona-xtrabackup-22-2.2.13-1.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 18 - "transfer closed with 884350 bytes remaining to read"
Trying other mirror.


Error Downloading Packages:
  percona-xtrabackup-22-2.2.13-1.el6.x86_64: failure: percona-xtrabackup-22-2.2.13-1.el6.x86_64.rpm from percona-release-x86_64: [Errno 256] No more mirrors to try.

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

wget
root@username1-pc ~]# rpm  -ivh   percona-xtrabackup-22-2.2.13-1.el6.x86_64.rpm 
warning: percona-xtrabackup-22-2.2.13-1.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY
error: Failed dependencies:
	perl(DBD::mysql) is needed by percona-xtrabackup-22-2.2.13-1.el6.x86_64
	perl(Time::HiRes) is needed by percona-xtrabackup-22-2.2.13-1.el6.x86_64
percona-xtrabackup-22                  x86_64               2.2.13-1.el6                              percona-release-x86_64               4.8 M
Installing for dependencies:
 Percona-Server-shared-51               x86_64               5.1.73-rel14.12.625.rhel6                 percona-release-x86_64               2.1 M
 perl-DBD-MySQL                         x86_64               4.013-3.el6                               base                                 134 k
 perl-Time-HiRes                        x86_64               4:1.9721-144.el6                          base                                  49 k
Updating for dependencies:
 perl                                   x86_64               4:5.10.1-144.el6                          base                                  10 M
 perl-Compress-Raw-Zlib                 x86_64               1:2.021-144.el6                           base                                  70 k
 perl-Compress-Zlib                     x86_64               2.021-144.el6                             base                                  46 k
 perl-IO-Compress-Base                  x86_64               2.021-144.el6                             base                                  70 k
 perl-IO-Compress-Zlib                  x86_64               2.021-144.el6                             base                                 136 k
 perl-Module-Pluggable                  x86_64               1:3.90-144.el6                            base                                  41 k
 perl-Pod-Escapes                       x86_64               1:1.04-144.el6                            base                                  33 k
 perl-Pod-Simple                        x86_64               1:3.13-144.el6                            base                                 213 k
 perl-libs                              x86_64               4:5.10.1-144.el6                          base                                 579 k
 perl-version                           x86_64               3:0.77-144.el6                            base                                  52 k

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

yum  install -y  perl-DBD-MySQL  perl-Time-HiRes

再执行rpm安装命令

rpm  -ivh   percona-xtrabackup-22-2.2.13-1.el6.x86_64.rpm

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

阅读原文内容投诉

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

软考中级精品资料免费领

  • 历年真题答案解析
  • 备考技巧名师总结
  • 高频考点精准押题
  • 2024年上半年信息系统项目管理师第二批次真题及答案解析(完整版)

    难度     813人已做
    查看
  • 【考后总结】2024年5月26日信息系统项目管理师第2批次考情分析

    难度     354人已做
    查看
  • 【考后总结】2024年5月25日信息系统项目管理师第1批次考情分析

    难度     318人已做
    查看
  • 2024年上半年软考高项第一、二批次真题考点汇总(完整版)

    难度     435人已做
    查看
  • 2024年上半年系统架构设计师考试综合知识真题

    难度     224人已做
    查看

相关文章

发现更多好内容

猜你喜欢

AI推送时光机
位置:首页-资讯-数据库
咦!没有更多了?去看看其它编程学习网 内容吧
首页课程
资料下载
问答资讯