centos5安装passenger

[rubyii@GHVM22-X3-03 ~]# gem -v
1.8.24
[rubyii@GHVM22-X3-03 ~]# gem install passenger
Fetching: daemon_controller-1.1.4.gem (100%)
Fetching: rack-1.5.2.gem (100%)
Fetching: passenger-4.0.3.gem (100%)
Successfully installed daemon_controller-1.1.4
Successfully installed rack-1.5.2
Successfully installed passenger-4.0.3
3 gems installed
Installing ri documentation for daemon_controller-1.1.4...
Installing ri documentation for rack-1.5.2...
Installing ri documentation for passenger-4.0.3...
Installing RDoc documentation for daemon_controller-1.1.4...
Installing RDoc documentation for rack-1.5.2...
Installing RDoc documentation for passenger-4.0.3...
[rubyii@GHVM22-X3-03 ~]#

[rubyii@GHVM22-X3-03 ~]# passenger-install-apache2-module
Welcome to the Phusion Passenger Apache 2 module installer, v4.0.3.

This installer will guide you through the entire installation process. It
shouldn't take more than 3 minutes in total.

Here's what you can expect from the installation process:

1. The Apache 2 module will be installed for you.
2. You'll learn how to configure Apache.
3. You'll learn how to deploy a Ruby on Rails application.

Don't worry if anything goes wrong. This installer will advise you on how to
solve any problems.

Press Enter to continue, or Ctrl-C to abort.


--------------------------------------------

Checking for required software...

* Checking for GNU C compiler...
 Found: yes
 Location: /usr/bin/gcc
* Checking for GNU C++ compiler...
 Found: yes
 Location: /usr/bin/g++
* Checking for Curl development headers with SSL support...
 Found: yes
 curl-config location: /usr/bin/curl-config
 Header location: /usr/include/curl/curl.h
 Version: libcurl 7.15.5
 Usable: yes
 Supports SSL: yes
* Checking for OpenSSL development headers...
 Found: yes
 Location: /usr/include/openssl/ssl.h
* Checking for Zlib development headers...
 Found: yes
 Location: /usr/include/zlib.h
* Checking for Ruby development headers...
 Found: yes
 Location: /usr/local/include/ruby-1.9.1/ruby.h
* Checking for OpenSSL support for Ruby...
 Found: yes
* Checking for RubyGems...
 Found: yes
* Checking for Rake (associated with /usr/local/bin/ruby)...
 Found: yes
 Location: /usr/local/bin/ruby /usr/local/bin/rake
* Checking for rack...
 Found: yes
* Checking for Apache 2...
 Found: yes
 Location of httpd: /usr/sbin/httpd
 Apache version: 2.2.3
* Checking for Apache 2 development headers...
 Found: no
* Checking for Apache Portable Runtime (APR) development headers...
 Found: no
* Checking for Apache Portable Runtime Utility (APU) development headers...
 Found: no

Some required software is not installed.
But don't worry, this installer will tell you how to install them.
Press Enter to continue, or Ctrl-C to abort.

回车继续给出安装提示:
------------------------------------------------------------------------------
Installation instructions for required software

* To install Apache 2 development headers:
  Please install it with yum install httpd-devel

* To install Apache Portable Runtime (APR) development headers:
  Please install it with yum install apr-devel

* To install Apache Portable Runtime Utility (APU) development headers:
  Please install it with yum install apr-util-devel

If the aforementioned instructions didn't solve your problem, then please take
a look at the Users Guide:

 /usr/local/lib/ruby/gems/1.9.1/gems/passenger-4.0.3/doc/Users guide Apache.html
------------------------------------------------------------------------------
安装第一个:
[rubyii@GHVM22-X3-03 ~]# yum install httpd-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* epel: mirrors.ustc.edu.cn
* base: mirrors.yun-idc.com
* updates: mirrors.yun-idc.com
* addons: mirrors.tuna.tsinghua.edu.cn
* extras: mirrors.yun-idc.com
epel                                                                                  | 3.6 kB     00:00    
base                                                                                  | 1.1 kB     00:00    
updates                                                                               | 1.9 kB     00:00    
addons                                                                                | 1.9 kB     00:00    
extras                                                                                | 2.1 kB     00:00    
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package httpd-devel.i386 0:2.2.3-78.el5.centos set to be updated
--> Processing Dependency: httpd = 2.2.3-78.el5.centos for package: httpd-devel
--> Processing Dependency: apr-util-devel for package: httpd-devel
--> Processing Dependency: apr-devel for package: httpd-devel
--> Running transaction check
--> Processing Dependency: httpd = 2.2.3-22.el5.centos for package: httpd-manual
--> Processing Dependency: httpd = 2.2.3-22.el5.centos for package: mod_ssl
---> Package httpd.i386 0:2.2.3-78.el5.centos set to be updated
---> Package apr-devel.i386 0:1.2.7-11.el5_6.5 set to be updated
--> Processing Dependency: apr = 1.2.7-11.el5_6.5 for package: apr-devel
---> Package apr-util-devel.i386 0:1.2.7-11.el5_5.2 set to be updated
--> Processing Dependency: apr-util = 1.2.7-11.el5_5.2 for package: apr-util-devel
--> Running transaction check
---> Package httpd-manual.i386 0:2.2.3-78.el5.centos set to be updated
---> Package mod_ssl.i386 1:2.2.3-78.el5.centos set to be updated
--> Processing Dependency: openssl >= 0.9.8e-12.el5_4.4 for package: mod_ssl
---> Package apr.i386 0:1.2.7-11.el5_6.5 set to be updated
---> Package apr-util.i386 0:1.2.7-11.el5_5.2 set to be updated
--> Running transaction check
---> Package openssl.i686 0:0.9.8e-26.el5_9.1 set to be updated
--> Processing Dependency: openssl = 0.9.8e-7.el5 for package: openssl-devel
--> Running transaction check
---> Package openssl-devel.i386 0:0.9.8e-26.el5_9.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================
Package                     Arch              Version                            Repository            Size
=============================================================================================================
Installing:
httpd-devel                 i386              2.2.3-78.el5.centos                updates              155 k
Updating:
apr                         i386              1.2.7-11.el5_6.5                   base                 124 k
apr-util                    i386              1.2.7-11.el5_5.2                   base                  80 k
httpd                       i386              2.2.3-78.el5.centos                updates              1.2 M
httpd-manual                i386              2.2.3-78.el5.centos                updates              818 k
mod_ssl                     i386              1:2.2.3-78.el5.centos              updates               97 k
openssl                     i686              0.9.8e-26.el5_9.1                  updates              1.5 M
openssl-devel               i386              0.9.8e-26.el5_9.1                  updates              1.9 M
Installing for dependencies:
apr-devel                   i386              1.2.7-11.el5_6.5                   base                 233 k
apr-util-devel              i386              1.2.7-11.el5_5.2                   base                  53 k

Transaction Summary
=============================================================================================================
Install      3 Package(s)        
Update       7 Package(s)        
Remove       0 Package(s)        

Total download size: 6.1 M
Is this ok [y/N]: y
Downloading Packages:
(1/10): apr-util-devel-1.2.7-11.el5_5.2.i386.rpm                                      |  53 kB     00:00    
(2/10): apr-util-1.2.7-11.el5_5.2.i386.rpm                                            |  80 kB     00:00    
(3/10): mod_ssl-2.2.3-78.el5.centos.i386.rpm                                          |  97 kB     00:00    
(4/10): apr-1.2.7-11.el5_6.5.i386.rpm                                                 | 124 kB     00:00    
(5/10): httpd-devel-2.2.3-78.el5.centos.i386.rpm                                      | 155 kB     00:00    
(6/10): apr-devel-1.2.7-11.el5_6.5.i386.rpm                                           | 233 kB     00:00    
(7/10): httpd-manual-2.2.3-78.el5.centos.i386.rpm                                     | 818 kB     00:01    
(8/10): httpd-2.2.3-78.el5.centos.i386.rpm                                            | 1.2 MB     00:00    
(9/10): openssl-0.9.8e-26.el5_9.1.i686.rpm                                            | 1.5 MB     00:00    
(10/10): openssl-devel-0.9.8e-26.el5_9.1.i386.rpm                                     | 1.9 MB     00:00    
-------------------------------------------------------------------------------------------------------------
Total                                                                        1.4 MB/s | 6.1 MB     00:04    
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
 Updating       : openssl                                         [ 1/17]
 Updating       : apr                                             [ 2/17]
 Installing     : apr-devel                                       [ 3/17]
 Updating       : openssl-devel                                   [ 4/17]
 Updating       : apr-util                                        [ 5/17]
 Updating       : httpd                                           [ 6/17]
 Updating       : mod_ssl                                         [ 7/17]
 Installing     : apr-util-devel                                  [ 8/17]
 Installing     : httpd-devel                                     [ 9/17]
 Updating       : httpd-manual                                    [10/17]
 Cleanup        : apr                                             [11/17]
 Cleanup        : openssl                                         [12/17]
 Cleanup        : httpd-manual                                    [13/17]
 Cleanup        : httpd                                           [14/17]
 Cleanup        : openssl-devel                                   [15/17]
 Cleanup        : apr-util                                        [16/17]
 Cleanup        : mod_ssl                                         [17/17]

Installed: httpd-devel.i386 0:2.2.3-78.el5.centos
Dependency Installed: apr-devel.i386 0:1.2.7-11.el5_6.5 apr-util-devel.i386 0:1.2.7-11.el5_5.2
Updated: apr.i386 0:1.2.7-11.el5_6.5 apr-util.i386 0:1.2.7-11.el5_5.2 httpd.i386 0:2.2.3-78.el5.centos httpd-manual.i386 0:2.2.3-78.el5.centos mod_ssl.i386 1:2.2.3-78.el5.centos openssl.i686 0:0.9.8e-26.el5_9.1 openssl-devel.i386 0:0.9.8e-26.el5_9.1
Complete!
[rubyii@GHVM22-X3-03 ~]# 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-4.0.3/libout/apache2/mod_passenger.so
  PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-4.0.3
  PassengerDefaultRuby /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!

Press ENTER to continue.
--------------------------------------------
Deploying a Ruby on Rails application: an example

Suppose you have a Rails application in /somewhere. Add a virtual host to your
Apache configuration file and set its DocumentRoot to /somewhere/public:

  <VirtualHost *:80>
 ServerName www.yourhost.com
 # !!! Be sure to point DocumentRoot to 'public'!
 DocumentRoot /somewhere/public    
 <Directory /somewhere/public>
# This relaxes Apache security settings.
AllowOverride all
# MultiViews must be turned off.
Options -MultiViews
 </Directory>
  </VirtualHost>

And that's it! You may also want to check the Users Guide for security and
optimization tips, troubleshooting and other useful information:

 /usr/local/lib/ruby/gems/1.9.1/gems/passenger-4.0.3/doc/Users guide Apache.html

Enjoy Phusion Passenger, a product of Phusion (www.phusion.nl) :-)
https://www.phusionpassenger.com

Phusion Passenger is a trademark of Hongli Lai & Ninh Bui.

你可能感兴趣的:(linux,Rails,passenger)