Created
May 8, 2014 08:24
-
-
Save shyiko/e0e82167a6195b0d4919 to your computer and use it in GitHub Desktop.
mysql-5.0.95-sandbox
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
Vagrant.configure("2") do |config| | |
config.vm.box = 'lucid32' | |
config.vm.box_url = 'http://files.vagrantup.com/lucid32.box' | |
config.vm.provision :shell, :inline => %Q( | |
apt-get update && apt-get install -y make libaio1 # libaio1 required by mysql | |
echo 'Downloading MySQL distribution ...' | |
wget --progress=dot:mega --content-disposition \ | |
http://mirror.cogentco.com/pub/mysql/MySQL-5.0/mysql-5.0.95-linux-i686-glibc23.tar.gz \ | |
2>&1 | grep --line-buffered -o '[0-9]*%' | |
wget -O - https://launchpad.net/mysql-sandbox/mysql-sandbox-3/mysql-sandbox-3/+download/MySQL-Sandbox-3.0.33.tar.gz | tar xzv | |
(cd MySQL-Sandbox-3.0.33 && perl Makefile.PL && make && make install) | |
su -c "make_replication_sandbox ~/mysql-5.0.95-linux-i686-glibc23.tar.gz \ | |
--remote_access='%' --how_many_slaves=1 --sandbox_base_port=33061 \ | |
--slave_options='-c log-slave-updates=TRUE'" vagrant | |
rm -f *.tar.gz | |
sed -i -e "s/exit\ 0/\\/home\\/vagrant\\/sandboxes\\/rsandbox_mysql-5_0_95\\/restart_all; exit 0/g" /etc/rc.local | |
) | |
config.vm.network :forwarded_port, guest: 33061, host: 33061 | |
config.vm.network :forwarded_port, guest: 33062, host: 33062 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment