passenger: Ubuntu installer install

root@ubuntu-vbox:~# ./passenger-2.2.2/bin/passenger-install-nginx-module
Welcome to the Phusion Passenger Nginx module installer, v2.2.2.

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

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

1. This installer will compile and install Nginx with Passenger support.
2. You’ll learn how to configure Passenger in Nginx.
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.:1


Checking for required software…

* GNU C++ compiler… found at /usr/bin/g++
* Ruby development headers… found
* OpenSSL support for Ruby… found
* RubyGems… found
* Rake… found at /usr/bin/rake
* fastthread… found
* Zlib development headers… found


Automatically download and install Nginx?

Nginx doesn’t support loadable modules such as some other web servers do,
so in order to install Nginx with Passenger support, it must be recompiled.

Do you want this installer to download, compile and install Nginx for you?

1. Yes: download, compile and install Nginx for me. (recommended)
    The easiest way to get started. A stock Nginx 0.6.36 with Passenger
    support, but with no other additional third party modules, will be
    installed for you to a directory of your choice.

2. No: I want to customize my Nginx installation. (for advanced users)
    Choose this if you want to compile Nginx with more third party modules
    besides Passenger, or if you need to pass additional options to Nginx’s
    ‘configure’ script. This installer will  1) ask you for the location of
    the Nginx source code,  2) run the ‘configure’ script according to your
    instructions, and  3) run ‘make install’.

Whichever you choose, if you already have an existing Nginx configuration file,
then it will be preserved.

Enter your choice (1 or 2) or press Ctrl-C to abort: 1


Downloading Nginx…
# wget -O /tmp/nginx-0.6.36.tar.gz
           => `/tmp/nginx-0.6.36.tar.gz’
Connecting to||:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 528,425 (516K) [application/octet-stream]

80% [========================================================================>                   ] 423,245       46.83K/s    ETA 00:02

15:14:09 (12.37 KB/s) – `/tmp/nginx-0.6.36.tar.gz’ saved [528425/528425]

Extracting Nginx source tarball…
# tar xzvf nginx-0.6.36.tar.gz





Where do you want to install Nginx to?

Please specify a prefix directory [/opt/nginx]:


Compiling Passenger support files…
# /usr/bin/ruby1.8 -S /usr/bin/rake clean nginx
(in /root/passenger-2.2.2)
rm -rf ext/apache2/Configuration.o ext/apache2/Bucket.o ext/apache2/Hooks.o ext/apache2/mod_passenger.o ext/apache2/
rm -rf ext/nginx/HelperServer
rm -r pkg
cd ext/phusion_passenger && make clean
rm -f ext/phusion_passenger/Makefile
rm -rf ext/apache2/libboost_oxt.a ext/apache2/libboost_oxt
rm -rf ext/apache2/libpassenger_common.a ext/apache2/ApplicationPoolServerExecutable ext/apache2/libpassenger_common
rm -rf ext/nginx/libboost_oxt.a ext/nginx/libboost_oxt
rm -rf ext/nginx/libpassenger_common.a ext/nginx/libpassenger_common
rm -rf test/libboost_oxt.a test/libboost_oxt
rm -rf test/libpassenger_common.a test/ApplicationPoolServerExecutable test/libpassenger_common
rm -rf test/oxt/oxt_test_main test/oxt/*.o test/CxxTests test/*.o
mkdir -p ext/nginx/libboost_oxt/boost
g++ -Iext  -D_REENTRANT -I/usr/local/include -Wall -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -o ext/nginx/libboost_oxt/boost/once.o
-c ext/boost/src/pthread/once.cpp
g++ -Iext  -D_REENTRANT -I/usr/local/include -Wall -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -o ext/nginx/libboost_oxt/boost/excepti
ons.o -c ext/boost/src/pthread/exceptions.cpp
g++ -Iext  -D_REENTRANT -I/usr/local/include -Wall -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -o ext/nginx/libboost_oxt/boost/thread.
o -c ext/boost/src/pthread/thread.cpp
mkdir -p ext/nginx/libboost_oxt/oxt
g++ -Iext  -D_REENTRANT -I/usr/local/include -Wall -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -o ext/nginx/libboost_oxt/oxt/tracable_
exception.o -c ext/oxt/tracable_exception.cpp
g++ -Iext  -D_REENTRANT -I/usr/local/include -Wall -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -o ext/nginx/libboost_oxt/oxt/backtrace
.o -c ext/oxt/backtrace.cpp
g++ -Iext  -D_REENTRANT -I/usr/local/include -Wall -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -o ext/nginx/libboost_oxt/oxt/thread.o
-c ext/oxt/thread.cpp
g++ -Iext  -D_REENTRANT -I/usr/local/include -Wall -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -o ext/nginx/libboost_oxt/oxt/system_ca
lls.o -c ext/oxt/system_calls.cpp
mkdir -p ext/nginx/libboost_oxt/boost ext/nginx/libboost_oxt/oxt
rm -rf ext/nginx/libboost_oxt.a
ar cru ext/nginx/libboost_oxt.a ext/nginx/libboost_oxt/boost/*.o ext/nginx/libboost_oxt/oxt/*.o
ranlib ext/nginx/libboost_oxt.a
mkdir -p ext/nginx/libpassenger_common
g++ -Iext -Iext/common  -D_REENTRANT -I/usr/local/include -Wall -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -o ext/nginx/libpassenger_
common/Utils.o -c ext/common/Utils.cpp
g++ -Iext -Iext/common  -D_REENTRANT -I/usr/local/include -Wall -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -o ext/nginx/libpassenger_
common/Logging.o -c ext/common/Logging.cpp
g++ -Iext -Iext/common  -D_REENTRANT -I/usr/local/include -Wall -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -o ext/nginx/libpassenger_
common/SystemTime.o -c ext/common/SystemTime.cpp
g++ -Iext -Iext/common  -D_REENTRANT -I/usr/local/include -Wall -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -o ext/nginx/libpassenger_
common/CachedFileStat.o -c ext/common/CachedFileStat.cpp
mkdir -p ext/nginx/libpassenger_common
rm -rf ext/nginx/libpassenger_common.a
ar cru ext/nginx/libpassenger_common.a ext/nginx/libpassenger_common/*.o
ranlib ext/nginx/libpassenger_common.a
g++ ext/nginx/HelperServer.cpp -o ext/nginx/HelperServer -Iext -Iext/common -D_REENTRANT -I/usr/local/include -Wall -g -DPASSENGER_DEBU
G -DBOOST_DISABLE_ASSERTS  ext/nginx/libpassenger_common.a ext/nginx/libboost_oxt.a -lpthread
cd ext/phusion_passenger && /usr/bin/ruby1.8 extconf.rb
creating Makefile
cd ext/phusion_passenger && make
cc -I. -I/usr/lib/ruby/1.8/i486-linux -I/usr/lib/ruby/1.8/i486-linux -I.  -fPIC -fno-strict-aliasing -g -g -O2  -fPIC  -c native_suppor
cc -shared -o native_support.o -L"." -L"/usr/lib" -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic    -lrub



Compiling and installing Nginx…
# ./configure –prefix=’/opt/nginx’ –add-module=’/root/passenger-2.2.2/ext/nginx’
checking for OS
+ Linux 2.6.24-24-generic i686
checking for C compiler … found
+ using GNU C compiler
+ gcc version: 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
checking for gcc -pipe switch … found
checking for gcc variadic macros … found
checking for C99 variadic macros … found
checking for unistd.h … found
checking for inttypes.h … found



checking for mmap(MAP_ANON|MAP_SHARED) … found
checking for mmap("/dev/zero", MAP_SHARED) … found
checking for System V shared memory … found
checking for struct msghdr.msg_control … found
checking for ioctl(FIONBIO) … found
checking for struct tm.tm_gmtoff … found

Configuration summary
  + using system PCRE library
  + OpenSSL library is not used
  + md5 library is not used
  + sha1 library is not used

  + using system zlib library

  nginx path prefix: "/opt/nginx"
  nginx binary file: "/opt/nginx/sbin/nginx"
  nginx configuration prefix: "/opt/nginx/conf"
  nginx configuration file: "/opt/nginx/conf/nginx.conf"
  nginx pid file: "/opt/nginx/logs/"
  nginx error log file: "/opt/nginx/logs/error.log"
  nginx http access log file: "/opt/nginx/logs/access.log"
  nginx http client request body temporary files: "/opt/nginx/client_body_temp"
  nginx http proxy temporary files: "/opt/nginx/proxy_temp"
  nginx http fastcgi temporary files: "/opt/nginx/fastcgi_temp"


# make
make -f objs/Makefile
make[1]: Entering directory `/tmp/nginx-0.6.36′
gcc -c -O -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wno-unused-function -Wunused-variable -Wunused-value -Werror -g  -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
                -o objs/src/core/nginx.o \



make[1]: Leaving directory `/tmp/nginx-0.6.36′
# make install
make -f objs/Makefile install
make[1]: Entering directory `/tmp/nginx-0.6.36′
test -d ‘/opt/nginx’ || mkdir -p ‘/opt/nginx’
test -d ‘/opt/nginx/sbin’               || mkdir -p ‘/opt/nginx/sbin’
test ! -f ‘/opt/nginx/sbin/nginx’               || mv ‘/opt/nginx/sbin/nginx’                   ‘/opt/nginx/sbin/nginx.old’
cp objs/nginx ‘/opt/nginx/sbin/nginx’
test -d ‘/opt/nginx/conf’               || mkdir -p ‘/opt/nginx/conf’
cp conf/koi-win ‘/opt/nginx/conf’
cp conf/koi-utf ‘/opt/nginx/conf’
cp conf/win-utf ‘/opt/nginx/conf’
test -f ‘/opt/nginx/conf/mime.types’            || cp conf/mime.types ‘/opt/nginx/conf’
cp conf/mime.types ‘/opt/nginx/conf/mime.types.default’
test -f ‘/opt/nginx/conf/fastcgi_params’                || cp conf/fastcgi_params ‘/opt/nginx/conf’
cp conf/fastcgi_params          ‘/opt/nginx/conf/fastcgi_params.default’
test -f ‘/opt/nginx/conf/nginx.conf’            || cp conf/nginx.conf ‘/opt/nginx/conf’
cp conf/nginx.conf ‘/opt/nginx/conf/nginx.conf.default’
test -d ‘/opt/nginx/logs’               || mkdir -p ‘/opt/nginx/logs’
test -d ‘/opt/nginx/logs’ ||            mkdir -p ‘/opt/nginx/logs’
test -d ‘/opt/nginx/html’               || cp -r html ‘/opt/nginx’
test -d ‘/opt/nginx/logs’ ||            mkdir -p ‘/opt/nginx/logs’
make[1]: Leaving directory `/tmp/nginx-0.6.36′


Nginx with Passenger support was successfully installed.

The Nginx configuration file (/opt/nginx/conf/nginx.conf)
must contain the correct configuration options in order for Phusion Passenger
to function correctly.

This installer has already modified the configuration file for you! The
following configuration snippet was inserted:

  http {
      passenger_root /root/passenger-2.2.2;
      passenger_ruby /usr/bin/ruby1.8;

After you start Nginx, you are ready to deploy any number of Ruby on Rails
applications on Nginx.

Press ENTER to continue.


Deploying a Ruby on Rails application: an example

Suppose you have a Ruby on Rails application in /somewhere. Add a server block
to your Nginx configuration file, set its root to /somewhere/public, and set
‘passenger_enabled on’, like this:

   server {
      listen 80;
      root /somewhere/public;   # <— be sure to point to ‘public’!
      passenger_enabled on;

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

  /root/passenger-2.2.2/doc/Users guide Nginx.html

Enjoy Phusion Passenger, a product of Phusion ( 🙂

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

カテゴリー: 未分類 パーマリンク


以下に詳細を記入するか、アイコンをクリックしてログインしてください。 ロゴ アカウントを使ってコメントしています。 ログアウト /  変更 )

Google+ フォト

Google+ アカウントを使ってコメントしています。 ログアウト /  変更 )

Twitter 画像

Twitter アカウントを使ってコメントしています。 ログアウト /  変更 )

Facebook の写真

Facebook アカウントを使ってコメントしています。 ログアウト /  変更 )


%s と連携中