-
Notifications
You must be signed in to change notification settings - Fork 5
Home
miyucy edited this page Jun 26, 2014
·
1 revision
Build with vagrant
vagrant up
vagrant vbguest --status
vagrant vbguest --do install --auto-reboot
vagrant halt
vagrant up
vagrant snapshot take latest
apt-get install -q -y cmake curl git-core build-essential zlib1g-dev libgdbm-dev libssl-dev libncurses5-dev libreadline5-dev libtool autoconf automake
git clone git://github.com/kamipo/mysql-build.git $HOME/mysql-build
mkdir -p $HOME/mysql-build/dists
curl -o $HOME/mysql-build/dists/mysql-5.6.11.tar.gz -s http://cdn.mysql.com/archives/mysql-5.6/mysql-5.6.11.tar.gz
echo 'PATH=$HOME/mysql-build/bin:$PATH' >> $HOME/.bashrc
source $HOME/.bashrc
mysql-build -v 5.6.11 $HOME/mysql/5.6.11 handlersocket-1.1.1
git clone git://github.com/sstephenson/rbenv.git $HOME/.rbenv
git clone git://github.com/sstephenson/ruby-build.git $HOME/.rbenv/plugins/ruby-build
echo 'PATH=$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH' >> $HOME/.bashrc
echo 'eval "$(rbenv init -)"' >> $HOME/.bashrc
source $HOME/.bashrc
rbenv install 2.1.2
echo '2.1.2' > $HOME/.rbenv/version
echo 'gem: --no-ri --no-rdoc' > $HOME/.gemrc
gem update --system
gem install bundler
vagrant snapshot take ready
cd mysql/5.6.11
./scripts/mysql_install_db
./bin/mysqld_safe &
./bin/mysqladmin -u root password 'password'
cat <<EOF >> ./my.cnf
[mysqld]
handlersocket_port = 9998
handlersocket_port_wr = 9999
handlersocket_address =
handlersocket_verbose = 0
handlersocket_timeout = 300
handlersocket_threads = 16
thread_concurrency = 128
open_files_limit = 65535
EOF
./bin/mysql -u root --password=password
install plugin handlersocket soname 'handlersocket.so';
\q
cd $HOME
rsync -va --exclude .git /vagrant/ $HOME/handlersocket
bundle config --global build.mysql --with-mysql-config=$HOME/mysql/5.6.11/bin/mysql_config
bundle config --global build.mysql2 --with-mysql-config=$HOME/mysql/5.6.11/bin/mysql_config
tar xf $HOME/mysql-build/dists/HandlerSocket-Plugin-for-MySQL-1.1.1.tar.gz
cd HandlerSocket-Plugin-for-MySQL-1.1.1
./autogen.sh
./configure --disable-handlersocket-server
make; sudo make install
rsync -va --exclude .bundle --exclude .git --exclude Gemfile.lock /vagrant/ $HOME/handlersocket; cd $HOME/handlersocket; bundle check || bundle install; rake