Skip to content

Instantly share code, notes, and snippets.

@drawcard
Last active August 29, 2015 14:15
Show Gist options
  • Save drawcard/c8168c6c60c36f6f14bb to your computer and use it in GitHub Desktop.
Save drawcard/c8168c6c60c36f6f14bb to your computer and use it in GitHub Desktop.
Bootstrap provisioning script to get useful software up and running on VMs
#!/usr/bin/env bash
bold='tput bold'
normal='tput sgr0'
# Configure home directory
# HOME=/home/vagrant/
HOME=~
echo '***** Check for package updates...'
sudo apt-get update
echo '***** Install LAMP Stack...'
sudo apt-get install -y lamp-server^
echo '***** Install git, htop, build-essential...'
sudo apt-get install -y git htop build-essential automysqlbackup
echo '***** Install PIP...'
sudo apt-get install -y python-pip python-dev
sudo pip install --upgrade pip
echo '***** Install RVM + Ruby, and SASS Gems...'
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable --ruby --gems=compass,sass,bootstrap-sass,guard-livereload
echo '***** Install Node + NVM...'
curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install -y nodejs
echo '***** Install Bower, Gulp, Grunt, LESS, grunt-contrib-sass, grunt-contrib-watch...'
npm install -g nvm gulp grunt-cli bower less grunt-contrib-sass grunt-contrib-watch
echo '***** Install WP-CLI...'
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
echo '***** Install git-bash-prompt...'
cd $HOME/
git clone https://github.com/magicmonty/bash-git-prompt.git .bash-git-prompt
echo 'source ~/.bash-git-prompt/gitprompt.sh' >> $HOME/.bashrc
source $HOME/.bashrc
echo '***** Install zsh + Oh My ZSH... (when prompted for password type: vagrant)'
sudo apt-get install -y zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
echo '***** SETUP COMPLETE!'
echo '***** To configure where AutoMYSQLBackup stores its backups, run "sudo nano /etc/default/automysqlbackup".'
echo '***** In your theme development folder, run "npm install && sudo npm install --save-dev bower gulp grunt-cli"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment