Last active
December 15, 2015 17:20
-
-
Save alanstevens/5296018 to your computer and use it in GitHub Desktop.
A script to setup a clean Vagrant box for rails development
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 | |
# | |
# execute this script with: | |
# wget -qO- https://gist.github.com/alanstevens/5296018/raw/vagrant_setup.sh|bash | |
# | |
echo "You will be prompted for your password by sudo." | |
# | |
# clear any previous sudo permission | |
# | |
sudo -k | |
# | |
# run inside sudo | |
# | |
sudo bash <<SCRIPT | |
# | |
# add heroku repository to apt | |
# | |
echo "deb http://toolbelt.heroku.com/ubuntu ./" > /etc/apt/sources.list.d/heroku.list | |
# | |
# install heroku's release key for package verification | |
# | |
wget -O- https://toolbelt.heroku.com/apt/release.key | apt-key add - | |
aptitude update | |
# | |
# grub throws a model during safe-upgrade, this is a precaution | |
# | |
DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade | |
# | |
# install some basic packages | |
# | |
aptitude -y install coreutils curl libpq-dev postgresql-server-dev-X.Y postgresql heroku-toolbelt nodejs libv8-dev build-essential linux-headers-`uname -r` | |
# | |
# In case the kernal was ugraded during a dist-upgrade, we rebuild guest additions | |
# | |
sudo /etc/init.d/vboxadd setup | |
# | |
# remove downloaded packages | |
# | |
apt-get clean | |
SCRIPT | |
# To update your base box, use these commands | |
# vagrant halt; vagrant package; vagrant box add new_basebox package.box |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment