Deploying the Ruby on Rails environment with Nginx+passenger

Source: Internet
Author: User
Tags ruby on rails

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.