用shell脚本安装mytop监控工具
脚本内容:
复制代码代码示例:
#!/bin/bash
(责任编辑:IT)#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 |