SQLAdvisor 封装docker sql自动优化建议工具 ubuntu 安装成功

https://github.com/Meituan-Dianping/SQLAdvisor

apt-get install -y gcc g++ cmake make libaio1 libaio-dev libffi-dev libglib2.0-0 libglib2.0-dev

apt install lsb-core
apt install curl
apt install git



git clone https://github.com/Meituan-Dianping/SQLAdvisor.git

cd SQLAdvisor

# 执行命令 1
apt-get install -y gnupg2 && \
wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb && \
dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb && \
rm -f percona-release_latest.$(lsb_release -sc)_all.deb && \
apt-get update && \
apt-get install -y libperconaserverclient18.1-dev


# 执行命令 2
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 ./

# 执行命令 3
ln -sf /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h /usr/local/sqlparser/include/glibconfig.h

# 执行命令 4 当前已经在SQLAdvisor/sqladvisor路径下
make

# 将生成的sqladvisor可执行文件复制到bin路径下
cp sqladvisor /bin


Copyright © Your Website 2021