Skip to content

Instantly share code, notes, and snippets.

@ryanzhou
Last active December 14, 2015 07:49
Show Gist options
  • Save ryanzhou/5053557 to your computer and use it in GitHub Desktop.
Save ryanzhou/5053557 to your computer and use it in GitHub Desktop.
Install Ruby 2.0.0p0 along with relevant packages and set up deployer user
echo "Installing software packages..."
apt-get -y update
apt-get -y upgrade
apt-get -y install build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl git-core openssh-server checkinstall libxml2-dev libxslt-dev libcurl4-openssl-dev libicu-dev libmysqlclient-dev
echo "Downloading Ruby 2.0..."
mkdir /tmp/ruby && cd /tmp/ruby
curl --progress http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz | tar xz
cd ruby-2.0.0-p0
echo "Compiling Ruby 2.0..."
./configure
make
make install
echo "Installing Bundler..."
gem install bundler
echo "Adding deployer user..."
adduser deployer --ingroup sudo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment