安装Percona-toolkit
2,820 total views, 1 views today
Percona-toolkit由Percona公司出品,是对MySQL功能的补充,给MySQL DBA带来了很大便利,也应该是每个DBA应该掌握的工具。其包含了大量pt工具,比如pt-heartbeat,pt-slave-delay,pt-table-checksum,pt-table-sync等。用于监控MySQL的状态、主从同步状况、修复主从不同步表等。
安装方法:
1、编译安装(推荐)
1 2 3 4 5 |
# tar zxvf percona-toolkit_2.2.20-1.tar.gz # cd percona-toolkit-2.2.20 # perl Makefile.PL # make # make install |
命令的默认路径
1 2 3 4 5 6 7 8 9 10 11 |
Installing /usr/local/bin/pt-ioprofile Installing /usr/local/bin/pt-table-checksum Installing /usr/local/bin/pt-stalk Installing /usr/local/bin/pt-duplicate-key-checker Installing /usr/local/bin/pt-variable-advisor Installing /usr/local/bin/pt-deadlock-logger Installing /usr/local/bin/pt-index-usage Installing /usr/local/bin/pt-summary Installing /usr/local/bin/pt-pmp Installing /usr/local/bin/pt-mext Installing /usr/local/bin/pt-find |
2、rpm安装
首先安装 perl-TermReadKey.x86_64 ,否则报 error: Failed dependencies: perl(Term::ReadKey) is needed by percona-toolkit-2.2.20-1.noarch
1 2 |
# yum install perl-TermReadKey.x86_64 # rpm -ivh percona-toolkit-2.2.20-1.noarch.rpm |