环境:centos6.5
下载地址:https://www.percona.com/downloads/percona-toolkit/
cd /opt
wget https://www.percona.com/downloads/percona-toolkit/3.0.2/binary/tarball/percona-toolkit-3.0.2_x86_64.tar.gz
tar -zxvf percona-toolkit-3.0.2_x86_64.tar.gz
cd percona-toolkit-3.0.2
perl Makefile.PL
如果报:BEGIN failed--compilation aborted at Makefile.PL line 1,需要安装perl-devel
yum install perl-devel
安装后再执行perl Makefile.PL可能会报找不到DBI,DBD-MySQL,IO-Socket-SSL.noarch,perl-Time-HiRes
用下边的方法在线安装:
yum install perl-DBI
yum install perl-DBD-MySQL
yum install perl-IO-Socket-SSL.noarch
yum install perl-Time-HiRes
然后:
make
make install
pt-table-checksum --help看看是否装成功
如果是ubuntu,则上面安装perlyila依赖包的步骤为
apt-get install libdbi-perl
apt-get install libdbd-mysql-perl