This article describes how to use Nginx+passenger to deploy the Ruby on Rails environment
The operating system version used in this article is CentOS6.5
1. Install Ruby
wget http://cache.ruby-lang.org/pub/ruby/ruby-2.0.0-p594.tar.gz
Mkdir-p/data/app_platform/ruby
TAR-ZXVF ruby-2.0.0-p594.tar.gz
CD ruby-2.0.0-p594
./configure--prefix=/data/app_platform/ruby
Make
Make install
ln-sf/data/app_platform/ruby/bin/*/usr/bin/
Gem Install Rails
2. Installing Nginx and Passenger
Passenger there are two ways to install, one is the standalone way that is passenger independent operation, and then through Nginx to forward the request of Ruby related to passenger, the other is integrated with Nginx installation, maintenance convenience. The first method is chosen here.
Passenger more than 4.0 and Nginx 1.4 can be integrated together
wget http://s3.amazonaws.com/phusion-passenger/releases/passenger-4.0.57.tar.gz
wget http://nginx.org/download/nginx-1.4.4.tar.gz
Useradd-r www-s/sbin/nologin
Mkdir-p/data/app_platform/{nginx,passenger}
TAR-ZXVF passenger-4.0.57.tar.gz
Mv-f passenger-4.0.57/* $install _dir/passenger
Reference Documentation:
Http://guides.ruby-china.org/getting_started.html
http://rubyonrails.org/deploy/
https://www.phusionpassenger.com/
Https://www.phusionpassenger.com/documentation/Users%20guide%20Nginx.html
Https://github.com/phusion/passenger/wiki/Unicorn-vs-Phusion-Passenger
This article is from the Linux SA John blog, so be sure to keep this source http://john88wang.blog.51cto.com/2165294/1605357
Deploying the Ruby on Rails environment with Nginx+passenger