Skip to content

Instantly share code, notes, and snippets.

@johnknott
Created November 2, 2011 00:05
Show Gist options
  • Save johnknott/1332342 to your computer and use it in GitHub Desktop.
Save johnknott/1332342 to your computer and use it in GitHub Desktop.
#!/bin/bash
echo -e "\e[1;36mUPDATING PACKAGES\e[00m"
echo "deb http://nginx.org/packages/debian/ squeeze nginx" | tee -a /etc/apt/sources.list
echo "deb-src http://nginx.org/packages/debian/ squeeze nginx" | tee -a /etc/apt/sources.list
apt-get --quiet --assume-yes update
echo -e "\e[1;36mINSTALLING PACKAGES\e[00m"
apt-get --assume-yes --allow-unauthenticated --quiet install build-essential bzip2 openssl libssl-dev libreadline6 libreadline6-dev libxml2-dev libxslt-dev libsqlite3-dev sqlite3 subversion vim zsh zlib1g zlib1g-dev nginx sudo git python libcurl4-openssl-dev libpcre3-dev mercurial libyaml-dev imagemagick
useradd -m -c "spree" -s /bin/bash spree
adduser spree sudo
curl http://betterthangrep.com/ack-standalone > /usr/bin/ack && chmod 0755 /usr/bin/ack
echo -e "\e[1;36mINSTALLING OH-MY-ZSH\e[00m"
su spree -l -c "wget --no-check-certificate https://raw.github.com/gist/1332567/gistfile1.sh -O - | sh"
chsh -s /bin/zsh spree
echo -e "\e[1;36mINSTALLING RVM\e[00m"
su spree -l -c "bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )"
echo -e "\e[1;36mINSTALLING NODE\e[00m"
su spree -l -c "wget --no-check-certificate https://raw.github.com/gist/1333666/nodeinstall.sh -O - | bash"
echo -e "\e[1;36mINSTALLING RUBY\e[00m"
su spree -l -c "[[ -s ~/.rvm/scripts/rvm ]] && source ~/.rvm/scripts/rvm && rvm install 1.9.3-p0"
su spree -l -c "[[ -s ~/.rvm/scripts/rvm ]] && source ~/.rvm/scripts/rvm && rvm --default use 1.9.3-p0"
echo -e "\e[1;36mINSTALLING RAILS/SPREE\e[00m"
su spree -l -c "[[ -s ~/.rvm/scripts/rvm ]] && source ~/.rvm/scripts/rvm && gem install spree rails"
echo -e "\e[1;36mDONE!\e[00m"
echo -e "\e[1;36mNow run 'passwd spree' to set up a password for the spree user , then log out of root and back in as the user, which has sudo rights.\e[00m"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment