Skip to content

Instantly share code, notes, and snippets.

@xcambar
Created March 14, 2014 01:27
Show Gist options
  • Save xcambar/9540586 to your computer and use it in GitHub Desktop.
Save xcambar/9540586 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