Skip to content

Instantly share code, notes, and snippets.

@antonfefilov
Created December 19, 2013 23:02
Show Gist options
  • Save antonfefilov/8047714 to your computer and use it in GitHub Desktop.
Save antonfefilov/8047714 to your computer and use it in GitHub Desktop.
#install required packages
apt-get update
apt-get upgrade -y
apt-get install -y git curl build-essential libssl-dev libcurl4-openssl-dev nodejs
#install sqlite3 (optional)
apt-get install libsqlite3-dev sqlite3
#install postgres (optional)
sudo apt-get install postlibpq-dev
#create deployment user
adduser deployer
addgroup deployer sudo
su deployer
#install rbenv, ruby and bundler
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile
echo 'eval "$(rbenv init -)"' >> ~/.profile
exec $SHELL -l
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
rbenv install 2.0.0-p195
rbenv global 2.0.0-p195
gem install bundler
#install passenger
gem install passenger
rbenv rehash
passenger-install-nginx-module
#choose option 1
#install on /home/deployer/nginx
server {
listen 80;
server_name www.yourhost.com;
root /somewhere/public; # <--- be sure to point to 'public'!
passenger_enabled on;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment