forked from aqzt/kjyw
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
## shell常用命令 2018-04-10 | ||
## http://www.aqzt.com | ||
## email: [email protected] | ||
## robert yu | ||
## Centos6下一键安装美团开源SQL优化工具SQLAdvisor脚本 | ||
|
||
yum install -y http://www.percona.com/downloads/percona-release/redhat/0.1-4/percona-release-0.1-4.noarch.rpm | ||
yum install -y gcc-c++ make gcc httpd php mysql php-mysql php-devel php-pear libssh2 libssh2-devel unzip cmake libaio-devel libffi-devel glib2 glib2-devel Percona-Server-shared-56 bison libaio-devel ncurses-devel | ||
|
||
echo '' | pecl install -f ssh2 | ||
ln -s /usr/lib64/libperconaserverclient_r.so.18 /usr/lib64/libperconaserverclient_r.so | ||
|
||
unzip SQLAdvisor.zip | ||
cd SQLAdvisor-master | ||
if [ -f CMakeCache.txt ];then | ||
echo ${line} | ||
fi | ||
rm -rf CMakeCache.txt | ||
cmake -DBUILD_CONFIG=mysql_release -DCMAKE_BUILD_TYPE=debug -DCMAKE_INSTALL_PREFIX=/usr/local/sqlparser ./ | ||
make && make install | ||
|
||
cd sqladvisor | ||
cmake -DCMAKE_BUILD_TYPE=debug ./ | ||
make | ||
cp sqladvisor /usr/bin/sqladvisor | ||
sqladvisor --help |