Skip to content

Commit

Permalink
SQLAdvisor
Browse files Browse the repository at this point in the history
  • Loading branch information
ppabc committed Apr 11, 2018
1 parent a70fd39 commit 8e815a6
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions shell/sqladvisor.sh
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

0 comments on commit 8e815a6

Please sign in to comment.