Last active
September 19, 2015 19:18
-
-
Save francisluong/9107ab9e568e826ff5cf to your computer and use it in GitHub Desktop.
Vagrant Bootstrapping for Ubuntu
This file contains hidden or 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 bash | |
su - vagrant -c "/bin/bash /vagrant/ubootstrap_user.sh" |
This file contains hidden or 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 bash | |
echo ">>> ubuntu root setup" | |
echo " update all packages" | |
sudo apt-get update -y | |
sudo apt-get upgrade -y | |
echo " install some packages too" | |
sudo apt-get install -y \ | |
vim \ | |
git \ | |
openssh-client \ | |
make \ | |
build-essential \ | |
libssl-dev \ | |
zlib1g-dev \ | |
libbz2-dev \ | |
libreadline-dev \ | |
libsqlite3-dev \ | |
wget \ | |
curl \ | |
chromium-browser | |
echo "<<< ubuntu root setup" | |
echo " install pyenv" | |
cd ~ | |
rm -Rf ~/.pyenv | |
git clone https://github.com/yyuu/pyenv.git ~/.pyenv | |
git clone https://github.com/yyuu/pyenv-virtualenvwrapper.git ~/.pyenv/plugins/pyenv-virtualenvwrapper | |
source ~/.bashrc | |
PYENVBIN=~/.pyenv/bin/pyenv | |
$PYENVBIN install 2.7.8 | |
$PYENVBIN global 2.7.8 | |
$PYENVBIN versions | |
echo " install rvm with ruby" | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 | |
\curl -sSL https://get.rvm.io | bash -s stable --ruby | |
echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile | |
echo "<<< ubuntu user setup" |
This file contains hidden or 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.network "public_network" | |
config.vm.synced_folder "../data", "/vagrant_data" | |
config.vm.provision :shell, path: "ubootstrap.sh" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment