zoukankan      html  css  js  c++  java
  • redhat部署passenger

    gem install passenger

    $ sudo passenger-install-apache2-module

    Installation instructions for required software

    * To install Apache 2 development headers:
    Please run yum install httpd-devel as root.

    * To install Apache Portable Runtime (APR) development headers:
    Please run yum install apr-devel as root.

    * To install Apache Portable Runtime Utility (APU) development headers:
    Please run yum install apr-util-devel as root.

    安装上述三个库以后重新执行

    $ sudo passenger-install-apache2-module

    显示一些编译信息。。。

    The Apache 2 module was successfully installed.

    Please edit your Apache configuration file, and add these lines:

    LoadModule passenger_module /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.17/ext/apache2/mod_passenger.so
    PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.17
    PassengerRuby /usr/local/bin/ruby

    After you restart Apache, you are ready to deploy any number of Ruby on Rails
    applications on Apache, without any further Ruby on Rails-specific
    configuration!

    上述内容添加到/etc/httpd/conf/httpd.conf

    然后添加一个Rails应用

    <VirtualHost *:80>
        ServerName www.loganalysis.com
        DocumentRoot /home/admin/workspace/LogAnalysis_Online/public
        <Directory /home/admin/workspace/LogAnalysis_Online/public>
            AllowOverride all
            Options -MultiViews
        </Directory>
    </VirtualHost>

    重启apache

    $ sudo /etc/init.d/httpd restart

    如果出现没有 '/' 访问权限的问题,则修改/etc/httpd/conf/httpd.conf

    User apache
    Group apache

    修改为

    User admin
    Group admin

    如果在Apache配置中设置RailsEnv development,Rails将在每个请求到达以后自动reload应用

  • 相关阅读:
    Codeforces Round #246 (Div. 2) —B. Football Kit
    expected expression __bridge
    ACM-百度之星资格赛之Energy Conversion——hdu4823
    xml解析-jaxp之dom解析
    NTP原理初步与配置
    Android开发学习之TabView选项卡具体解释 -- 基于Android4.4
    Apache轻量级性能測试工具--ab
    BAT的云
    03001_数据库
    ASP.NET调用dos命令获取交换机流量
  • 原文地址:https://www.cnblogs.com/scige/p/2721050.html
Copyright © 2011-2022 走看看