MySQL xtrabackup for centos7.2安裝
centos7.2上安裝MySQL的備份工具xtrabackup,建議掛載映象,配置YUM源,使用yum進行安裝來解決包依賴關係;
除非使用編譯安裝,不要再使用rpm -ivh來安裝xtrabackup了,包依賴關係解決起來累死人,尤其是作業系統是最小化安裝
的那種。
1、配置yum源
--獲取rpm包
rpm -ivh
--yum倉庫
[percona]name = CentOS $releasever - Perconabaseurl=
enabled = 1
gpgkey = file:///mnt/pki/rpm-gpg/RPM-GPG-KEY-percona
gpgcheck = 1
--獲取key-percona
wget
cp RPM-GPG-KEY-percona /mnt/pki/rpm-gpg/RPM-GPG-KEY-percona
2、配置好yum源之後,首先安裝xtrabackup執行環境必須的perl
[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 4:5.16.3-286.el7 will be updated
---> Package perl.x86_64 4:5.16.3-292.el7 will be an update
--> Processing Dependency: perl-libs = 4:5.16.3-292.el7 for package: 4:perl-5.16.3-292.el7.x86_64
--> Running transaction check
---> Package perl-libs.x86_64 4:5.16.3-286.el7 will be updated
---> Package perl-libs.x86_64 4:5.16.3-292.el7 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
=======================================================================================================================================================================
Package Arch Version Repository Size
=======================================================================================================================================================================
Updating:
perl x86_64 4:5.16.3-292.el7 base 8.0 M
Updating for dependencies:
perl-libs x86_64 4:5.16.3-292.el7 base 688 k
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.
(1/2): perl-libs-5.16.3-292.el7.x86_64.rpm | 688 kB 00:00:00
(2/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/4
Updating : 4:perl-5.16.3-292.el7.x86_64 2/4
Cleanup : 4:perl-libs-5.16.3-286.el7.x86_64 3/4
Cleanup : 4:perl-5.16.3-286.el7.x86_64 4/4
Verifying : 4:perl-5.16.3-292.el7.x86_64 1/4
Verifying : 4:perl-libs-5.16.3-292.el7.x86_64 2/4
Verifying : 4:perl-libs-5.16.3-286.el7.x86_64 3/4
Verifying : 4:perl-5.16.3-286.el7.x86_64 4/4
Updated:
perl.x86_64 4:5.16.3-292.el7
Dependency Updated:
perl-libs.x86_64 4:5.16.3-292.el7
Complete!
[root@idc-srm-mysql-db xtrabackup]#
3、然後安裝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 0: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 0: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 0: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 0: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 0:0.48-5.el7 will be installed
--> Running transaction check
---> Package perl-Compress-Raw-Bzip2.x86_64 0: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 x86_64 4.023-5.el7 base 140 k
Installing for dependencies:
perl-Compress-Raw-Bzip2 x86_64 2.061-3.el7 base 32 k
perl-Compress-Raw-Zlib x86_64 1:2.061-4.el7 base 57 k
perl-DBI x86_64 1.627-4.el7 base 802 k
perl-IO-Compress noarch 2.061-2.el7 base 260 k
perl-Net-Daemon noarch 0.48-5.el7 base 51 k
perl-PlRPC noarch 0.2020-14.el7 base 36 k
Transaction Summary
=======================================================================================================================================================================
Install 1 Package (+6 Dependent packages)
Total download size: 1.3 M
Installed size: 3.4 M
Downloading packages:
(1/7): perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64.rpm | 32 kB 00:00:00
(2/7): perl-Compress-Raw-Zlib-2.061-4.el7.x86_64.rpm | 57 kB 00:00:00
(3/7): perl-DBD-MySQL-4.023-5.el7.x86_64.rpm | 140 kB 00:00:00
(4/7): perl-DBI-1.627-4.el7.x86_64.rpm | 802 kB 00:00:00
(5/7): perl-IO-Compress-2.061-2.el7.noarch.rpm | 260 kB 00:00:00
(6/7): perl-Net-Daemon-0.48-5.el7.noarch.rpm | 51 kB 00:00:00
(7/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 1/7
Installing : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64 2/7
Installing : perl-IO-Compress-2.061-2.el7.noarch 3/7
Installing : perl-Net-Daemon-0.48-5.el7.noarch 4/7
Installing : perl-PlRPC-0.2020-14.el7.noarch 5/7
Installing : perl-DBI-1.627-4.el7.x86_64 6/7
Installing : perl-DBD-MySQL-4.023-5.el7.x86_64 7/7
Verifying : perl-Net-Daemon-0.48-5.el7.noarch 1/7
Verifying : perl-IO-Compress-2.061-2.el7.noarch 2/7
Verifying : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64 3/7
Verifying : perl-PlRPC-0.2020-14.el7.noarch 4/7
Verifying : perl-DBD-MySQL-4.023-5.el7.x86_64 5/7
Verifying : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64 6/7
Verifying : perl-DBI-1.627-4.el7.x86_64 7/7
Installed:
perl-DBD-MySQL.x86_64 0:4.023-5.el7
Dependency Installed:
perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7 perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7 perl-DBI.x86_64 0:1.627-4.el7 perl-IO-Compress.noarch 0:2.061-2.el7
perl-Net-Daemon.noarch 0:0.48-5.el7 perl-PlRPC.noarch 0:0.2020-14.el7
Complete!
[root@idc-srm-mysql-db xtrabackup]#
4、然後安裝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 0: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 0:1.17-245.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=======================================================================================================================================================================
Package Arch Version Repository Size
=======================================================================================================================================================================
Installing:
perl-Digest-MD5 x86_64 2.52-3.el7 base 30 k
Installing for dependencies:
perl-Digest noarch 1.17-245.el7 base 23 k
Transaction Summary
=======================================================================================================================================================================
Install 1 Package (+1 Dependent package)
Total download size: 53 k
Installed size: 82 k
Downloading packages:
(1/2): perl-Digest-1.17-245.el7.noarch.rpm | 23 kB 00:00:00
(2/2): 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/2
Installing : perl-Digest-MD5-2.52-3.el7.x86_64 2/2
Verifying : perl-Digest-1.17-245.el7.noarch 1/2
Verifying : perl-Digest-MD5-2.52-3.el7.x86_64 2/2
Installed:
perl-Digest-MD5.x86_64 0:2.52-3.el7
Dependency Installed:
perl-Digest.noarch 0:1.17-245.el7
Complete!
[root@idc-srm-mysql-db xtrabackup]
5、最後安裝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 0:2.3.6-1.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=======================================================================================================================================================================
Package Arch Version Repository Size
=======================================================================================================================================================================
Installing:
percona-xtrabackup x86_64 2.3.6-1.el7 base 4.6 M
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/1
Verifying : percona-xtrabackup-2.3.6-1.el7.x86_64 1/1
Installed:
percona-xtrabackup.x86_64 0:2.3.6-1.el7
Complete!
[root@idc-srm-mysql-db xtrabackup]#
6、檢視 xtrabackup版本
[root@idc-srm-mysql-db xtrabackup]# xtrabackup --version
xtrabackup version 2.3.6 based on MySQL server 5.6.24 Linux (x86_64) (revision id: )
[root@idc-srm-mysql-db xtrabackup]#
到此 xtrabackup安裝完成,可以使用了,如果是rpm安裝會非常麻煩,一個個rpm包依賴,找起來困難,安裝起來麻煩,還浪費時間。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29357786/viewspace-2221305/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- centos7.2 mysql5.7安裝教程CentOSMySql
- mysql之 xtrabackup-2.4.12 安裝MySql
- 安裝xtrabackup
- Centos7.2安裝NginxCentOSNginx
- RHEL安裝Xtrabackup
- CentOS7.2 安裝 MongoDB 3.4CentOSMongoDB
- Centos7.2中安裝pipCentOS
- XtraBackup工具詳解 Part 2 xtrabackup安裝
- Xtrabackup安裝及使用
- mysql之 percona-xtrabackup 2.4.7安裝(熱備工具)MySql
- mysql5.7GroupReplication多主模式在Centos7.2上安裝部署MySql模式CentOS
- CentOS 6.5 Xtrabackup 2.4.2安裝流程CentOS
- Percona XtraBackup 原始碼安裝原始碼
- centos7.2原始碼安裝Apache2.4CentOS原始碼Apache
- xtrabackup_2.4.9安裝依賴包
- XtraBackup 用rpm的安裝方法
- Xtrabackup2.0.8原始碼安裝使用原始碼
- centos7.2 influxdb安裝與簡單使用CentOSUX
- CentOS7.2下安裝配置Node.js和YarnCentOSNode.jsYarn
- MySQL:xtrabackup備份MySql
- MySQL Percona XtraBackupMySql
- XtraBackup備份MySQLMySql
- Docker 驗證 Centos7.2 離線安裝 Docker 環境DockerCentOS
- MySQL8.0之XtraBackupMySql
- xtrabackup備份mysql innodbMySql
- Percona Xtrabackup2.4.12版本安裝小記
- 【MySql】 MySql備份工具Xtrabackup之二MySql
- 【MySql】 MySql備份工具Xtrabackup之一MySql
- mysql安裝 (yum 安裝)MySql
- CentOS下使用yum方式安裝percona xtrabackup步驟CentOS
- mysql xtrabackup 遭遇嚴重bugMySql
- mysql 安裝MySql
- MySQL安裝MySql
- 安裝mysqlMySql
- solaris mysql 安裝 解除安裝MySql
- [mysql]ubuntu安裝mysqlMySqlUbuntu
- CentOS release 5.9安裝xtrabackup2.1.5與測試SLAVE重置CentOS
- 連網安裝mysql與原始碼安裝mysqlMySql原始碼