下载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