1. 程式人生 > >percona-toolkit安裝使用

percona-toolkit安裝使用

下載rpm包,本次下載是最percona-toolkit新版本3.0.12

wget https://www.percona.com/downloads/percona-toolkit/3.0.12/binary/redhat/6/x86_64/percona-toolkit-3.0.12-1.el6.x86_64.rpm

直接安裝會報沒有依賴包的錯誤如下

#rpm -ivh percona-toolkit-3.0.12-1.el6.x86_64.rpm 
warning: percona-toolkit-3.0.12-1.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY
error: Failed dependencies:
	perl(DBI) >= 1.13 is needed by percona-toolkit-3.0.12-1.el6.x86_64
	perl(DBD::mysql) >= 1.0 is needed by percona-toolkit-3.0.12-1.el6.x86_64
	perl(IO::Socket::SSL) is needed by percona-toolkit-3.0.12-1.el6.x86_64
	perl(Digest::MD5) is needed by percona-toolkit-3.0.12-1.el6.x86_64
	perl(Term::ReadKey) is needed by percona-toolkit-3.0.12-1.el6.x86_64

安裝依賴包

 yum install perl-DBI perl-DBD-MySQL perl-Digest-MD5 perl-IO-Socket-SSL perl-TermReadKey

安裝percona-toolkit

rpm -ivh percona-toolkit-3.0.12-1.el6.x86_64.rpm

直接使用yum安裝

使用yum會自動安裝依賴包,比較簡單

yum install -y percona-toolkit-3.0.12-1.el6.x86_64.rpm 

驗證

 pt-online-schema-change --help