Nginx+passenger+mina+ruby on Rails Combat deployment

Source: Internet
Author: User
Tags ruby on rails

First, the use of passenger-install-nginx-module Installation:

Install Passenger:gem installed passenger first, and if you do not have permission, add sudo to the front.

Because nginx dynamic module loading is not supported, it is used passenger to compile and install the passenger modifiednginx

Installing Nginx with passenger:

  passenger-install-nginx-module

  按照提示,一步步安装。

In the Nginx configuration file (by default in the/opt/nginx/conf/directory), you can see the following configuration:

  

At this point, nginx and passenger installation is complete.

Ii. installing ruby and Rails

First install RVM: \curl-ssl Https://get.rvm.io | Bash-s stable, see more: http://rvm.io/

View the installed Rvm:rvm-v

  

Installing RUBY:RVM install with RVM 2.1.5

  2.1.5 is the version number of Ruby and can be selected according to your needs.

This installation will take some time, after successful installation can be viewed: ruby-v

  

Installing Rails:gem install Rails-v 4.2 with gem

After the installation is complete, rails-v

  

Ruby on Rails has also been installed successfully.

Three, mina configuration:

Add: Gem ' Mina ' in the project's gemfile, then run bundle install

Then view Mina:mina-v

  

Run: Mina Init, will be in the Config directory under the product of a deploy.rb file, will be such as:

  

Here to do the corresponding configuration, after the modification is completed, run: Mina setup, this initializes the server (the corresponding directory is established on the server).

Iv. Deployment

Run deployment command: Mina deploy

Enter the password to deploy it.

In addition, to use a no-password deployment, first use RSA to generate key, the contents of Id_rsa.pub added to the server's. ssh/authorized_keys file at the end. Also generate the same RSA on the service (preferably with a blank password), add its id_rsa.pub content to the corresponding settings of the code management station, such as GitHub, coding, etc.

  

  

Nginx+passenger+mina+ruby on Rails Combat deployment

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.