1. 程式人生 > >安裝percona-toolkit步驟

安裝percona-toolkit步驟

安裝percona-toolkit步驟

1. 下載percona-toolkit

官網下載即可。連結: https://www.percona.com/downloads/percona-toolkit/LATEST/

2. 安裝依賴

  • yum install perl-DBI
  • yum install perl-DBD-MySQL
  • yum install perl-Time-HiRes
  • yum install perl-IO-Socket-SSL
    如果安裝過程中出現如下錯誤:
Error: Package: perl-DBD-MySQL-4.023-6.el7.x86_64 (
base) Requires: libmysqlclient.so.18()(64bit) Error: Package: perl-DBD-MySQL-4.023-6.el7.x86_64 (base) Requires: libmysqlclient.so.18(libmysqlclient_18)(64bit) Error: Package: 2:postfix-2.10.1-6.el7.x86_64 (@anaconda) Requires: libmysqlclient.so.18()(64bit) Error: Package: 2:postfix-2.10.1-6.el7.x86_64 (
@anaconda) Requires: libmysqlclient.so.18(libmysqlclient_18)(64bit) You could try using --skip-broken to work around the problem ** Found 2 pre-existing rpmdb problem(s), 'yum check' output follows: 2:postfix-2.10.1-6.el7.x86_64 has missing requires of libmysqlclient.so.18()(64bit) 2:postfix-2.10.1-6.el7.x86_64 has missing requires of libmysqlclient.so.18(
libmysqlclient_18)(64bit)

則是有依賴包沒有安裝,去mysql 官網下載一個即可。
接著安裝percona-toolkit。接著報錯

[[email protected] mysql]# rpm -ivh percona-toolkit-3.0.12-1.el7.x86_64.rpm
warning: percona-toolkit-3.0.12-1.el7.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY
error: Failed dependencies:
	perl(Digest::MD5) is needed by percona-toolkit-3.0.12-1.el7.x86_64

則需要執行如下命令:

yum -y install perl-Digest-MD5

最後安裝percona-toolkit

[[email protected] mysql]# rpm -ivh percona-toolkit-3.0.12-1.el7.x86_64.rpm
warning: percona-toolkit-3.0.12-1.el7.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:percona-toolkit-3.0.12-1.el7     ################################# [100%]