maatkit安装
一,安装DBI
cd /root
wget http://ftp.cuhk.edu.hk/pub/packages/perl/CPAN/authors/id/T/TI/TIMB/DBI-1.616.tar.gz
tar zxvf DBI-1.616.tar.gz
cd DBI-1.616

perl Makefile.PL
make && make install

二,安装data-showtable包
cd /root
wget http://search.cpan.org/CPAN/authors/id/A/AK/AKSTE/Data-ShowTable-3.3.tar.gz
tar zxvf Data-ShowTable-3.3.tar.gz
cd Data-ShowTable-3.3

perl Makefile.PL
make && make install

三,安装msql-mysql-modules
cd /root
wget http://search.cpan.org/CPAN/authors/id/J/JW/JWIED/Msql-Mysql-modules-1.2219.tar.gz
tar zxvf Msql-Mysql-modules-1.2219.tar.gz
cd Msql-Mysql-modules-1.2219

perl Makefile.PL
make && make install

四,安装DBD-mysql 
cd /root
wget http://search.cpan.org/CPAN/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.019.tar.gz
tar zxvf DBD-mysql-4.019.tar.gz
cd DBD-mysql-4.019

perl Makefile.PL --mysql_config=/usr/local/mysql/bin/mysql_config
make && make install

五,安装maatkit
cd /root
wget http://maatkit.googlecode.com/files/maatkit-7486.tar.gz
tar zxvf maatkit-7486.tar.gz
cd maatkit-7486

perl Makefile.PL
make && make install

六,测试
mk-
mk-show-grants
mk-duplicate-key-checker
mk-slave-find -h127.0.0.1 -u'user' -p'passwd'