当前位置: > shell编程 >

shell脚本:MySQL监控软件mytop的安装

时间:2014-11-05 12:25来源:linux.it.net.cn 作者:IT

用shell脚本安装mytop监控工具

脚本内容:
 

复制代码代码示例:
#!/bin/bash  
#site: www.it.net.cn
# mysql监控软件 mytop
#function   install mysql monitor   -----mytop  
mkdir  data  
cd  data  
wget http://search.cpan.org/CPAN/authors/id/J/JS/JSTOWE/TermReadKey-2.30.tar.gz  
tar zxvf   TermReadKey-2.30.tar.gz   
cd TermReadKey-2.30  
perl  Makefile.PL  
make  
make test  
make install  
cd ..  
wget   http://cpan.uwinnipeg.ca/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 test  
make intall  
cd ..  
yum -y  install perl-DBD-MySQL  perl-DBI  
wget http://linux.it.net.cn/mysql/mytop/mytop-1.6.tar.gz  
tar zxvf  mytop-1.6.tar.gz  
cd mytop-1.6  
perl  Makefile.PL  
make  
make test  
make install  
./mytop -u admin -p "12345678" -h 127.0.0.1:3306  
(责任编辑:IT)
------分隔线----------------------------
栏目列表
推荐内容