Forked from xaicron/q4m_and_handler_socket_install.sh
Last active
August 29, 2015 14:02
-
-
Save iwata/78bc60ca337f65279207 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env zsh | |
set -xe | |
MYSQL_VERSION=5.1.69 | |
MYSQL_BASEDIR=$HOME/.mysqlenv/mysqls/${MYSQL_VERSION} | |
MYSQL_SRCDIR=$HOME/.mysqlenv/mysql-build/build/mysql-${MYSQL_VERSION} | |
Q4M_VERSION=0.9.9 | |
if [ ! -d ~/tmp ]; then | |
mkdir ~/tmp | |
fi | |
### Q4M | |
echo -e "\e[1;32mStarting Q4M installation.\e[m" | |
cd ~/tmp | |
curl -O http://q4m.kazuhooku.com/dist/q4m-${Q4M_VERSION}.tar.gz | |
tar zxfv q4m-${Q4M_VERSION}.tar.gz | |
cd q4m-${Q4M_VERSION} | |
./configure --with-mysql=${MYSQL_SRCDIR} --prefix=${MYSQL_BASEDIR} | |
make && make install | |
mysql -u root < support-files/install.sql | |
mysql -u root -e 'show plugins' | |
### HS | |
echo -e "\e[1;32mStarting HandlerSocket installation.\e[m" | |
cd ~/tmp | |
if [ ! -d "HandlerSocket-Plugin-for-MySQL" ]; then | |
git clone git://github.com/DeNA/HandlerSocket-Plugin-for-MySQL.git | |
fi | |
cd HandlerSocket-Plugin-for-MySQL | |
git pull origin master | |
./autogen.sh | |
./configure --with-mysql-source=${MYSQL_SRCDIR} --with-mysql-bindir=${MYSQL_BASEDIR}/bin | |
make && make install | |
mysql -u root -e "install plugin handlersocket soname 'handlersocket.so'" | |
### finish | |
mysql -uroot -e 'show plugins' | |
echo -e "\e[1;32mdone.\e[m" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment