Last active
December 25, 2015 12:59
-
-
Save mdespuits/6979931 to your computer and use it in GitHub Desktop.
Rails setup for Rails production server using Nginx, Git, Postgresql, and the speedy Recap capistrano gem.
This file contains 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
#!/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