Skip to content

Instantly share code, notes, and snippets.

@mdespuits mdespuits/setup-ubuntu.sh
Last active Dec 25, 2015

Embed
What would you like to do?
Rails setup for Rails production server using Nginx, Git, Postgresql, and the speedy Recap capistrano gem.
#!/bin/sh
sudo apt-get -y update
sudo add-apt-repository ppa:nginx/stable
sudo apt-get -y update
sudo apt-get install -y git-core postgresql-9.1 mysql-server libpq-dev \
curl build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
cd /tmp
if [ ! -e /usr/local/bin/gem ]; then
echo "Downloading Ruby..."
wget -q http://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p247.tar.gz
tar xvfz ruby-2.0.0-p247.tar.gz
cd ruby-2.0.0-p247/
echo "Installing Ruby..."
./configure --prefix=/usr/local
make
make install
echo "Updating all the things..."
sudo gem update --system
sudo gem install bundler --no-ri --no-rdoc
cd /tmp
rm -rf ruby-2.0.0-p247/
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.