본문 바로가기

MySQL/MySQL Admin

percona toolkit 설치

사실 이걸 먼저 올렸어야 했는데..

 

percona toolkit perl로 이루어져 있기 때문에 perl 최신버전과 perl MySQL을 연동 시켜주는 프로그램을 설치해야합니다.

 

제 테스트 환경은 VMWare에서 CentOS 6.7 을 설치한 상태입니다.

 

percona 쪽의 최신 버전을 받기 위해  wget으로 rpm을 받아옵니다

wget percona.com/get/percona-toolkit.rpm

 

받아 온 후 rpm 설치를 하려했으나! 아래와 같은 것들이 필요하네요..

저는 mysql을 소스로 설치해서 그런 것 같습니다.

아래는 설치하는 방법인데요..ㅎ 어렵지는 않은데 해당 rpm yum 설치해야하니까 rpm 이름만 잘 설정해서 받으면 될 것 같습니다.

 

[root@MONDB mysql]# rpm -ivh percona-toolkit.rpm

warning: percona-toolkit.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY

error: Failed dependencies:

             perl(DBI) >= 1.13 is needed by percona-toolkit-2.2.16-1.noarch

             perl(DBD::mysql) >= 1.0 is needed by percona-toolkit-2.2.16-1.noarch

             perl(Time::HiRes) is needed by percona-toolkit-2.2.16-1.noarch

             perl(IO::Socket::SSL) is needed by percona-toolkit-2.2.16-1.noarch

             perl(Term::ReadKey) is needed by percona-toolkit-2.2.16-1.noarch

            

[root@MONDB mysql]# yum install perl-DBI

=======================================================================

 Package               Arch                  Version           Repository        Size

=======================================================================

Installing:

 perl-DBI              x86_64              1.609-4.el6            base            705 k

=======================================================================

Install       1 Package(s)

Installed:

  perl-DBI.x86_64 0:1.609-4.el6                                                                                                                                              

Complete!

 

[root@MONDB mysql]# yum install perl-DBD-MySQL

=======================================================================

 Package                         Arch                  Version           Repository               Size

=======================================================================

Installing:

 perl-DBD-MySQL             x86_64              4.013-3.el6            base                   134 k

=======================================================================

Install       1 Package(s)

Installed:

  perl-DBD-MySQL.x86_64 0:4.013-3.el6                                                                                                                                       

Complete!

 

[root@MONDB mysql]# yum install perl-TermReadKey

=======================================================================

 Package                    Arch                  Version           Repository        Size

=======================================================================

Installing:

perl-TermReadKey      x86_64               2.30-13.el6           base             31 k

=======================================================================

Install       1 Package(s)

Installed:

  perl-TermReadKey.x86_64 0:2.30-13.el6                                                                                                                                      

Complete!

 

[root@MONDB mysql]# yum install perl-Time-HiRes

=======================================================================

 Package                           Arch                  Version                      Repository            Size

=======================================================================

Installing:

 perl-Time-HiRes              x86_64              4:1.9721-141.el6_7.1           updates              49 k

Updating for dependencies:

 perl                              x86_64              4:5.10.1-141.el6_7.1           updates               10 M

 perl-Module-Pluggable     x86_64              1:3.90-141.el6_7.1             updates               40 k

 perl-Pod-Escapes             x86_64              1:1.04-141.el6_7.1            updates                33 k

 perl-Pod-Simple              x86_64              1:3.13-141.el6_7.1             updates              213 k

 perl-libs                        x86_64              4:5.10.1-141.el6_7.1            updates              579 k

 perl-version                   x86_64               3:0.77-141.el6_7.1             updates                52 k

=======================================================================

Install       1 Package(s)

Upgrade       6 Package(s)

Installed:

  perl-Time-HiRes.x86_64 4:1.9721-141.el6_7.1                                                                                                                                

Dependency Updated:

perl.x86_64 4:5.10.1-141.el6_7.1 perl-Module-Pluggable.x86_64 1:3.90-141.el6_7.1

perl-Pod-Escapes.x86_64 1:1.04-141.el6_7.1 perl-Pod-Simple.x86_64 1:3.13-141.el6_7.1

  perl-libs.x86_64 4:5.10.1-141.el6_7.1 perl-version.x86_64 3:0.77-141.el6_7.1        

Complete!

 

[root@MONDB mysql]# yum install perl-IO-Socket-SSL

=======================================================================

 Package                          Arch               Version           Repository              Size

=======================================================================

Installing:

 perl-IO-Socket-SSL          noarch            1.31-2.el6              base                   69 k

Installing for dependencies:

 perl-Net-LibIDN             x86_64            0.12-3.el6               base                  35 k

 perl-Net-SSLeay             x86_64            1.35-9.el6               base                 173 k

 

Transaction Summary

=======================================================================

Install       3 Package(s)

Installed:

  perl-IO-Socket-SSL.noarch 0:1.31-2.el6                                                                                                                                    

Dependency Installed:

  perl-Net-LibIDN.x86_64 0:0.12-3.el6         perl-Net-SSLeay.x86_64 0:1.35-9.el6                                                 

Complete!

 

[root@MONDB mysql]# rpm -ivh percona-toolkit.rpm

warning: percona-toolkit.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY

Preparing...                ########################################### [100%]

   1:percona-toolkit        ########################################### [100%]

 

[root@MONDB bin]# ls  /usr/bin/pt-*

/usr/bin/pt-align                        /usr/bin/pt-find                /usr/bin/pt-mext                          /usr/bin/pt-slave-delay    /usr/bin/pt-table-usage

/usr/bin/pt-archiver                    /usr/bin/pt-fingerprint        /usr/bin/pt-mysql-summary           /usr/bin/pt-slave-find      /usr/bin/pt-upgrade

/usr/bin/pt-config-diff                 /usr/bin/pt-fk-error-logger  /usr/bin/pt-online-schema-change  /usr/bin/pt-slave-restart   /usr/bin/pt-variable-advisor

/usr/bin/pt-deadlock-logger         /usr/bin/pt-heartbeat         /usr/bin/pt-pmp                         /usr/bin/pt-stalk             /usr/bin/pt-visual-explain

/usr/bin/pt-diskstats                   /usr/bin/pt-index-usage      /usr/bin/pt-query-digest              /usr/bin/pt-summary

/usr/bin/pt-duplicate-key-checker  /usr/bin/pt-ioprofile          /usr/bin/pt-show-grants               /usr/bin/pt-table-checksum

/usr/bin/pt-fifo-split                   /usr/bin/pt-kill                  /usr/bin/pt-sift                           /usr/bin/pt-table-sync

 

여기까지가 rpm을 이용한 percona toolkit 설치입니다! 어렵지는 않았죠 ㅎ

 

이제 제대로 pt-schema-online-change를 쓰겠습니다