一、下载软件
最近版本直接wget
wget percona.com/get/percona-toolkit.tar.gz
可选版本 进入软件下载目录,选择待安装版本下载
复制链接地址下载
wget 2.2.16/tarball/percona-toolkit-2.2.16.tar.gz
二、解压软件阅读INSTALL文件 -- 安装步骤
Extract the tarball and cd to the resulting directory:
tar zxvf percona-toolkit-.tar.gz
cd percona-toolkit-
Generate the Makefile, which will check Perl module dependencies and
so forth:
perl Makefile.PL
Build the tools' man pages and prep for test and install:
make
Test that the tools can run:
make test
All tests should pass. If not, then your system may be missing a Perl module
required by a tool. The tests are not comprehensive; they only test that the
tools can be executed by Perl and Bash.
Finally, install all tools and their man pages:
make install
三、安装过程中出现的问题及解决办法
==================================================
问题
perl Makefile.PL
Can't locate ExtUtils/MakeMaker.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at Makefile.PL line 1.
BEGIN failed--compilation aborted at Makefile.PL line 1.
解决办法
yum install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker
问题
Can't locate Time/HiRes.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/bin/pt-heartbeat line 3110.
BEGIN failed--compilation aborted at /usr/local/bin/pt-heartbeat line 3110.
解决办法
yum install perl-Time-HiRes -y
问题
Character set 'utf8mb4' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index.xml' file
Character set 'utf8mb4' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index.xml' file
DBI connect('test;mysql_socket=/tmp/mysql.sock;mysql_read_default_group=client','root',...) failed: Can't initialize character set utf8mb4 (path: /usr/share/mysql/charsets/) at /usr/local/bin/pt-heartbeat line 2137
解决办法
vi /usr/share/mysql/charsets/Index.xml
# append
Unicode
UTF-8 Unicode
utf-8
primary
compiled
binary
compiled
# append
==================================================
附:出现下面这个
不是问题,继续安装
make test
No tests defined for percona-toolkit extension.
阅读(1260) | 评论(0) | 转发(0) |