Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

MySQL xtrabackup for centos7.2 installation

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Install xtrabackup, the backup tool for MySQL on centos7.2. It is recommended to mount the image, configure the YUM source, and install using yum to solve the package dependency.

Unless you use compiler installation, do not use rpm-ivh to install xtrabackup. Package dependencies are exhausting to solve, especially when the operating system minimizes installation.

That kind of thing.

1. Configure the yum source

-- get the rpm package

Rpm-ivh http://www.percona.com/downloads/percona-release/percona-release-0.0-1.x86_64.rpm

-- yum warehouse

[percona] name = CentOS $releasever-Perconabaseurl= http://repo.percona.com/centos/$releasever/os/$basearch/

Enabled = 1

Gpgkey = file:///mnt/pki/rpm-gpg/RPM-GPG-KEY-percona

Gpgcheck = 1

-- get key-percona

Wget http://www.percona.com/redir/downloads/percona-release/RPM-GPG-KEY-percona

Cp RPM-GPG-KEY-percona / mnt/pki/rpm-gpg/RPM-GPG-KEY-percona

2. After configuring the yum source, first install the perl that is necessary for the xtrabackup runtime environment

[root@idc-srm-mysql-db xtrabackup] # yum-y install perl

Loaded plugins: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

Resolving Dependencies

-> Running transaction check

-> Package perl.x86_64 4VR 5.16.3-286.el7 will be updated

-> Package perl.x86_64 4VR 5.16.3-292.el7 will be an update

-- > Processing Dependency: perl-libs = 4VR 5.16.3-292.el7 for package: 4:perl-5.16.3-292.el7.x86_64

-> Running transaction check

-> Package perl-libs.x86_64 4VR 5.16.3-286.el7 will be updated

-> Package perl-libs.x86_64 4VR 5.16.3-292.el7 will be an update

-> Finished Dependency Resolution

Dependencies Resolved

=

Package Arch Version Repository Size

=

Updating:

Perl x86x 64 4VR 5.16.3-292.el7 base 8.0m

Updating for dependencies:

Perl-libs x86x 64 4purl 5.16.3-292.el7 base 688k

Transaction Summary

=

Upgrade 1 Package (+ 1 Dependent package)

Total download size: 8.6 M

Downloading packages:

Delta RPMs disabled because / usr/bin/applydeltarpm not installed.

(1ap2): perl-libs-5.16.3-292.el7.x86_64.rpm | 688 kB 00:00:00

(2max 2): perl-5.16.3-292.el7.x86_64.rpm | 8.0 MB 00:00:00

-

Total 44 MB/s | 8.6 MB 00:00:00

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

Warning: RPMDB altered outside of yum.

Updating: 4:perl-libs-5.16.3-292.el7.x86_64 1 Compact 4

Updating: 4:perl-5.16.3-292.el7.x86_64 2 Compact 4

Cleanup: 4:perl-libs-5.16.3-286.el7.x86_64 3 Compact 4

Cleanup: 4:perl-5.16.3-286.el7.x86_64 4 Compact 4

Verifying: 4:perl-5.16.3-292.el7.x86_64 1 Compact 4

Verifying: 4:perl-libs-5.16.3-292.el7.x86_64 2 Compact 4

Verifying: 4:perl-libs-5.16.3-286.el7.x86_64 3 Compact 4

Verifying: 4:perl-5.16.3-286.el7.x86_64 4 Compact 4

Updated:

Perl.x86_64 4Rank 5.16.3-292.el7

Dependency Updated:

Perl-libs.x86_64 4Rank 5.16.3-292.el7

Complete!

[root@idc-srm-mysql-db xtrabackup] #

3. Then install perl-DBD

[root@idc-srm-mysql-db xtrabackup] # yum-y install perl-DBD

Loaded plugins: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

No package perl-DBD available.

Error: Nothing to do

[root@idc-srm-mysql-db xtrabackup] # yum-y install perl-DBD-MySQL

Loaded plugins: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

Resolving Dependencies

-> Running transaction check

-> Package perl-DBD-MySQL.x86_64 0RU 4.023-5.el7 will be installed

-> Processing Dependency: perl (DBI::Const::GetInfoType) for package: perl-DBD-MySQL-4.023-5.el7.x86_64

-> Processing Dependency: perl (DBI) for package: perl-DBD-MySQL-4.023-5.el7.x86_64

-> Running transaction check

-> Package perl-DBI.x86_64 0RU 1.627-4.el7 will be installed

-- > Processing Dependency: perl (RPC::PlServer) > = 0.2001 for package: perl-DBI-1.627-4.el7.x86_64

-- > Processing Dependency: perl (RPC::PlClient) > = 0.2000 for package: perl-DBI-1.627-4.el7.x86_64

-> Running transaction check

-> Package perl-PlRPC.noarch 0rime 0.2020-14.el7 will be installed

-- > Processing Dependency: perl (Net::Daemon) > = 0.13 for package: perl-PlRPC-0.2020-14.el7.noarch

-> Processing Dependency: perl (Net::Daemon::Test) for package: perl-PlRPC-0.2020-14.el7.noarch

-> Processing Dependency: perl (Net::Daemon::Log) for package: perl-PlRPC-0.2020-14.el7.noarch

-> Processing Dependency: perl (Compress::Zlib) for package: perl-PlRPC-0.2020-14.el7.noarch

-> Running transaction check

-> Package perl-IO-Compress.noarch 0RU 2.061-2.el7 will be installed

-- > Processing Dependency: perl (Compress::Raw::Zlib) > = 2.061 for package: perl-IO-Compress-2.061-2.el7.noarch

-- > Processing Dependency: perl (Compress::Raw::Bzip2) > = 2.061 for package: perl-IO-Compress-2.061-2.el7.noarch

-> Package perl-Net-Daemon.noarch 0RU 0.48-5.el7 will be installed

-> Running transaction check

-> Package perl-Compress-Raw-Bzip2.x86_64 0RU 2.061-3.el7 will be installed

-> Package perl-Compress-Raw-Zlib.x86_64 1 2.061-4.el7 will be installed

-> Finished Dependency Resolution

Dependencies Resolved

=

Package Arch Version Repository Size

=

Installing:

Perl-DBD-MySQL x8631 64 4.023-5.el7 base 140k

Installing for dependencies:

Perl-Compress-Raw-Bzip2 x8631 64 2.061-3.el7 base 32k

Perl-Compress-Raw-Zlib x86x 64 1purl 2.061-4.el7 base 57k

Perl-DBI x8631 64 1.627-4.el7 base 802k

Perl-IO-Compress noarch 2.061-2.el7 base 260k

Perl-Net-Daemon noarch 0.48-5.el7 base 51k

Perl-PlRPC noarch 0.2020-14.el7 base 36k

Transaction Summary

=

Install 1 Package (+ 6 Dependent packages)

Total download size: 1.3 M

Installed size: 3.4 M

Downloading packages:

(1can7): perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64.rpm | 32 kB 00:00:00

(2ache 7): perl-Compress-Raw-Zlib-2.061-4.el7.x86_64.rpm | 57 kB 00:00:00

(3 kB 7): perl-DBD-MySQL-4.023-5.el7.x86_64.rpm | 140 kB 00:00:00

(4 kB 7): perl-DBI-1.627-4.el7.x86_64.rpm | 802 kB 00:00:00

(5ache 7): perl-IO-Compress-2.061-2.el7.noarch.rpm | 260 kB 00:00:00

(6ap7): perl-Net-Daemon-0.48-5.el7.noarch.rpm | 51 kB 00:00:00

(7ax 7): perl-PlRPC-0.2020-14.el7.noarch.rpm | 36 kB 00:00:00

-

Total 8.1 MB/s | 1.3 MB 00:00:00

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

Installing: perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64 1Comp7

Installing: 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64 2 Compact 7

Installing: perl-IO-Compress-2.061-2.el7.noarch 3 Universe 7

Installing: perl-Net-Daemon-0.48-5.el7.noarch 4 Compact 7

Installing: perl-PlRPC-0.2020-14.el7.noarch 5 Universe 7

Installing: perl-DBI-1.627-4.el7.x86_64 6 and 7

Installing: perl-DBD-MySQL-4.023-5.el7.x86_64 7 Compact 7

Verifying: perl-Net-Daemon-0.48-5.el7.noarch 1 Compact 7

Verifying: perl-IO-Compress-2.061-2.el7.noarch 2 Compact 7

Verifying: 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64 3 Universe 7

Verifying: perl-PlRPC-0.2020-14.el7.noarch 4 Compact 7

Verifying: perl-DBD-MySQL-4.023-5.el7.x86_64 5 Universe 7

Verifying: perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64 6Comp7

Verifying: perl-DBI-1.627-4.el7.x86_64 7 Compact 7

Installed:

Perl-DBD-MySQL.x86_64 0RO 4.023-5.el7

Dependency Installed:

Perl-Compress-Raw-Bzip2.x86_64 0VOR 2.061-3.el7 perl-Compress-Raw-Zlib.x86_64 1 4.el7 perl-DBI.x86_64 0V 2.061-4.el7 perl-DBI.x86_64 0V 1.627-4.el7 perl-IO-Compress.noarch 0V 2.061-2.el7

Perl-Net-Daemon.noarch 0VOR 0.48-5.el7 perl-PlRPC.noarch 0RO 0.2020-14.el7

Complete!

[root@idc-srm-mysql-db xtrabackup] #

4. Then install perl-Digest-MD5

[root@idc-srm-mysql-db xtrabackup] # yum-y install perl-Digest-MD5

Loaded plugins: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

Resolving Dependencies

-> Running transaction check

-> Package perl-Digest-MD5.x86_64 0RU 2.52-3.el7 will be installed

-- > Processing Dependency: perl (Digest::base) > = 1.00 for package: perl-Digest-MD5-2.52-3.el7.x86_64

-> Running transaction check

-> Package perl-Digest.noarch 0RU 1.17-245.el7 will be installed

-> Finished Dependency Resolution

Dependencies Resolved

=

Package Arch Version Repository Size

=

Installing:

Perl-Digest-MD5 x8631 64 2.52-3.el7 base 30k

Installing for dependencies:

Perl-Digest noarch 1.17-245.el7 base 23k

Transaction Summary

=

Install 1 Package (+ 1 Dependent package)

Total download size: 53 k

Installed size: 82 k

Downloading packages:

(1ap2): perl-Digest-1.17-245.el7.noarch.rpm | 23 kB 00:00:00

(2ap2): perl-Digest-MD5-2.52-3.el7.x86_64.rpm | 30 kB 00:00:00

-

Total 569 kB/s | 53 kB 00:00:00

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

Installing: perl-Digest-1.17-245.el7.noarch 1 Compact 2

Installing: perl-Digest-MD5-2.52-3.el7.x86_64 2max 2

Verifying: perl-Digest-1.17-245.el7.noarch 1 Compact 2

Verifying: perl-Digest-MD5-2.52-3.el7.x86_64 2max 2

Installed:

Perl-Digest-MD5.x86_64 0VOR 2.52-3.el7

Dependency Installed:

Perl-Digest.noarch 0vl 1.17-245.el7

Complete!

[root@idc-srm-mysql-db xtrabackup]

5. Finally install percona-xtrabackup

[root@idc-srm-mysql-db xtrabackup] # yum-y install percona-xtrabackup

Loaded plugins: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

Resolving Dependencies

-> Running transaction check

-> Package percona-xtrabackup.x86_64 0RU 2.3.6-1.el7 will be installed

-> Finished Dependency Resolution

Dependencies Resolved

=

Package Arch Version Repository Size

=

Installing:

Percona-xtrabackup x86 million 64 2.3.6-1.el7 base 4.6m

Transaction Summary

=

Install 1 Package

Total download size: 4.6 M

Installed size: 18 M

Downloading packages:

Percona-xtrabackup-2.3.6-1.el7.x86_64.rpm | 4.6 MB 00:00:00

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

Installing: percona-xtrabackup-2.3.6-1.el7.x86_64 1 Compact 1

Verifying: percona-xtrabackup-2.3.6-1.el7.x86_64 1 Compact 1

Installed:

Percona-xtrabackup.x86_64 0VOR 2.3.6-1.el7

Complete!

[root@idc-srm-mysql-db xtrabackup] #

6. View the xtrabackup version

[root@idc-srm-mysql-db xtrabackup] # xtrabackup-- version

Xtrabackup version 2.3.6 based on MySQL server 5.6.24 Linux (x86x64) (revision id:)

[root@idc-srm-mysql-db xtrabackup] #

To this xtrabackup installation is complete, you can use, if it is rpm installation will be very troublesome, a rpm package dependence, difficult to find, trouble to install, but also a waste of time.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report