Passengerãå ¥ãã
ããããè½ã¡çãã¦ããããããªã¨æã£ã¦ãPassenger(mod_rails) ã Ubuntu ã«å ¥ãã¦ã¿ã¾ããã
ã¤ã³ã¹ãã¼ã«
ã¤ã³ã¹ãã¼ã«ããã ãã§ãã
$ s gem install passenger $ s passenger-install-apache2-module
ã ãã ãã¨ããã¤ã³ã¹ãã¼ã«
ä¾ã«ãã£ã¦ä¾ã®å¦ãã失æãå«ããã¤ã³ã¹ãã¼ã«çµéã¯ãããªæãã§ãããããªã passenger ã®ã¤ã³ã¹ãã¼ã«ããå§ãã¦ãã¾ãã¾ãã
$ s gem install passenger
Install required dependency fastthread? [Yn] Y Select which gem to install for your platform (i486-linux) 1. fastthread 1.0.1 (mswin32) 2. fastthread 1.0.1 (ruby) 3. fastthread 1.0.1 (i386-mswin32) 4. Skip this gem 5. Cancel installation > 2 Successfully installed passenger-1.0.5 Successfully installed fastthread-1.0.1 Installing ri documentation for passenger-1.0.5... Installing ri documentation for fastthread-1.0.1... No definition for dummy_dump No definition for rb_queue_marshal_load No definition for rb_queue_marshal_dump Installing RDoc documentation for passenger-1.0.5... Installing RDoc documentation for fastthread-1.0.1... /usr/lib/ruby/1.8/rdoc/generators/template/html/html.rb:25: warning: already initialized constant FONTS /usr/lib/ruby/1.8/rdoc/generators/template/html/html.rb:235: warning: already initialized constant STYLE
ãªã«ãããwarning ãåºã¦ã¾ãããã¤ã³ã¹ãã¼ã«ã¯ã¡ããã¨ã§ãã¦ããã§ãã次㫠passenger-install-apache2-module ãå®è¡ããã¨è¶³ããªããã®ãæãã¦ãããã¯ãã
$ s passenger-install-apache2-module
sudo: passenger-install-apache2-module: command not found
ãããªãããããªã³ãã³ããªãï¼ãã§è¹´ããã¾ããããããããªããã£ã±ãã£ãã® warning ã®ãã㧠passenger ãã¡ããã¨å ¥ããªãã£ãã®ãããããªããããããã¨ãã¯ãuninstall ãã¦ããããç´ãã ã
$ s gem uninstall passenger Successfully uninstalled passenger version 1.0.5 Remove executables and scripts for 'passenger-spawn-server, passenger-install-apache2-module, passenger-config, passenger-memory-stats, passenger-make-enterprisey' in addition to the gem? [Yn] Y Removing passenger-spawn-server Removing passenger-install-apache2-module Removing passenger-config Removing passenger-memory-stats Removing passenger-make-enterprisey
ãããpassenger-install-apache2-module ã¹ã¯ãªãããåé¤ããããã£ã¦è¨ã£ã¦ãã£ã¦ãã¨ã¯ããã£ã±ãå ¥ã£ã¦ããããã2åç®ã¯ãªã«ãèãããã¤ã³ã¹ãã¼ã«OKã
$ s gem install passenger
Successfully installed passenger-1.0.5
Installing ri documentation for passenger-1.0.5...
Installing RDoc documentation for passenger-1.0.5...
passenger-install-apache2-module ãæ¢ãã¦ã¿ãã
$ s find / -name passenger-install-apache2-module
/var/lib/gems/1.8/gems/passenger-1.0.5/bin/passenger-install-apache2-module
/var/lib/gems/1.8/bin/passenger-install-apache2-module
ãã£ã±ããããªã
$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
ãããåå ãã/var/lib/gems/1.8/bin ã«ãã¹ãéã£ã¦ãªãããããã§ãããã«ã¯ rails ã¨ã rake ãªãããå ¥ã£ã¦ã¦ããã¾ã¾ã§æ®éã«ä½¿ã£ã¦ããããã¹ãéã£ã¦ãªããªãã¦ã¡ãã£ã¨èããããªããã©ãªãããªãããã£ã¦ PATHãåæåãã¡ãã£ãããªãã¨ãããããPATHã追å ãã¦ããã
$ export PATH=$PATH:/var/lib/gems/1.8/bin
ã§ãpassenger-install-apache2-module ã«åãã£ã¬ã³ã¸ã
$ s passenger-install-apache2-module
sudo: passenger-install-apache2-module: command not found
ããããã£ã¡ã® PATH ãå¤ãã¦ããsudo ã® PATH ã¯å¤ãããªãã®ã(s printenv ã§ç¢ºèª)ã
ãsudo ã® PATH ã¯ã»ãã¥ãªãã£ä¸å¤ããããªããã¨ããæè¦ãããããroot ã§ãã°ã¤ã³ã㦠~/.bash_profile ã«æ¸ãã°ï¼ãã¨ãã°ã°ã«ã¨ãããããã£ããã ãã©ãã©ãããã¾ãããããã ãããã端æ«ããã® root ãã°ã¤ã³ã¯ç¦æ¢ãã¦ãããã¨ãããã¨ã§ãä»å1åã®ã¿ã®ãã¨ãªã®ã§ãã«ãã¹ã§æå®ãããã¨ã«ãä½åã使ãã¹ã¯ãªããã ã£ããã·ã³ããªãã¯ãªã³ã¯å¼µããã©ãã
$ s /var/lib/gems/1.8/bin/passenger-install-apache2-module Welcome to the Passenger Apache 2 module installer, v1.0.5. 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. 1ãâããã㯠1ãé¸æ Checking for required software... * GNU C++ compiler... not found * Ruby development headers... found * OpenSSL support for Ruby... found * RubyGems... found * Rake... not found * Apache 2... found at /usr/sbin/apache2 * Apache 2 development headers... not found * Apache Portable Runtime (APR) development headers... found * fastthread... found 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
ãGNU C++ compilerãã¨ãRakeãããApache 2 development headersãããªãã£ã¦æãã¦ããã¦ããã ãã©ããRakeãã¯ãã¹ãéã£ã¦ãªãã ãã§ããã®ã§ãã·ã³ããªãã¯ãªã³ã¯ãå¼µããã¨ã«ãã¦ãä»ã®2ã¤ãå ¥ãããã¨ã«ããã
$ s apt-get install build-essential åå¾:1 http://jp.archive.ubuntu.com gutsy/main libstdc++6-4.1-dev 4.1.2-16ubuntu2 [1129kB] åå¾:2 http://jp.archive.ubuntu.com gutsy/main g++-4.1 4.1.2-16ubuntu2 [2600kB] åå¾:3 http://jp.archive.ubuntu.com gutsy/main g++ 4:4.1.2-9ubuntu2 [1440B] åå¾:4 http://jp.archive.ubuntu.com gutsy/main patch 2.5.9-4 [95.6kB] åå¾:5 http://jp.archive.ubuntu.com gutsy/main dpkg-dev 1.14.5ubuntu16 [162kB] åå¾:6 http://jp.archive.ubuntu.com gutsy/main build-essential 11.3ubuntu1 [7066B] æªé¸æããã±ã¼ã¸ libstdc++6-4.1-dev ãé¸æãã¦ãã¾ãã æªé¸æããã±ã¼ã¸ g++-4.1 ãé¸æãã¦ãã¾ãã æªé¸æããã±ã¼ã¸ g++ ãé¸æãã¦ãã¾ãã æªé¸æããã±ã¼ã¸ patch ãé¸æãã¦ãã¾ãã æªé¸æããã±ã¼ã¸ dpkg-dev ãé¸æãã¦ãã¾ãã æªé¸æããã±ã¼ã¸ build-essential ãé¸æãã¦ãã¾ãã
$ s ln -s /var/lib/gems/1.8/bin/rake /usr/bin/rake
$ s apt-get install apache2-prefork-dev åå¾:1 http://jp.archive.ubuntu.com gutsy/main libldap2-dev 2.1.30-13.4 [227kB] åå¾:2 http://jp.archive.ubuntu.com gutsy/main libexpat1-dev 1.95.8-4ubuntu1 [129kB] åå¾:3 http://jp.archive.ubuntu.com gutsy-updates/main libdb4.4-dev 4.4.20-8.1ubuntu3.1 [546kB] åå¾:4 http://jp.archive.ubuntu.com gutsy-updates/main libpcrecpp0 7.4-0ubuntu0.7.10.2 [91.0kB] åå¾:5 http://jp.archive.ubuntu.com gutsy-updates/main libpcre3-dev 7.4-0ubuntu0.7.10.2 [251kB] åå¾:6 http://jp.archive.ubuntu.com gutsy-updates/main uuid-dev 1.2-1.40.2-1ubuntu1.1 [49.6kB] åå¾:7 http://jp.archive.ubuntu.com gutsy/main libapr1-dev 1.2.7-8.2ubuntu1 [337kB] åå¾:8 http://jp.archive.ubuntu.com gutsy/main zlib1g-dev 1:1.2.3.3.dfsg-5ubuntu2 [160kB] åå¾:9 http://jp.archive.ubuntu.com gutsy-updates/main libkadm55 1.6.dfsg.1-7ubuntu0.1 [148kB] åå¾:10 http://jp.archive.ubuntu.com gutsy-updates/main comerr-dev 2.1-1.40.2-1ubuntu1.1 [40.6kB] åå¾:11 http://jp.archive.ubuntu.com gutsy-updates/main libkrb5-dev 1.6.dfsg.1-7ubuntu0.1 [88.6kB] åå¾:12 http://jp.archive.ubuntu.com gutsy-updates/main libpq-dev 8.2.7-0ubuntu0.7.10 [347kB] åå¾:13 http://jp.archive.ubuntu.com gutsy/main libaprutil1-dev 1.2.7+dfsg-2build1 [117kB] åå¾:14 http://jp.archive.ubuntu.com gutsy-updates/main apache2-prefork-dev 2.2.4-3ubuntu0.1 [410kB] åå¾:15 http://jp.archive.ubuntu.com gutsy-updates/main libssl0.9.8 0.9.8e-5ubuntu3.2 [2825kB] åå¾:16 http://jp.archive.ubuntu.com gutsy-updates/main libssl-dev 0.9.8e-5ubuntu3.2 [1943kB] æªé¸æããã±ã¼ã¸ libldap2-dev ãé¸æãã¦ãã¾ãã æªé¸æããã±ã¼ã¸ libexpat1-dev ãé¸æãã¦ãã¾ãã æªé¸æããã±ã¼ã¸ libdb4.4-dev ãé¸æãã¦ãã¾ãã æªé¸æããã±ã¼ã¸ libpcrecpp0 ãé¸æãã¦ãã¾ãã æªé¸æããã±ã¼ã¸ libpcre3-dev ãé¸æãã¦ãã¾ãã æªé¸æããã±ã¼ã¸ uuid-dev ãé¸æãã¦ãã¾ãã æªé¸æããã±ã¼ã¸ libapr1-dev ãé¸æãã¦ãã¾ãã æªé¸æããã±ã¼ã¸ zlib1g-dev ãé¸æãã¦ãã¾ãã æªé¸æããã±ã¼ã¸ libssl-dev ãé¸æãã¦ãã¾ãã æªé¸æããã±ã¼ã¸ libkadm55 ãé¸æãã¦ãã¾ãã æªé¸æããã±ã¼ã¸ comerr-dev ãé¸æãã¦ãã¾ãã æªé¸æããã±ã¼ã¸ libkrb5-dev ãé¸æãã¦ãã¾ãã æªé¸æããã±ã¼ã¸ libpq-dev ãé¸æãã¦ãã¾ãã æªé¸æããã±ã¼ã¸ libaprutil1-dev ãé¸æãã¦ãã¾ãã æªé¸æããã±ã¼ã¸ apache2-prefork-dev ãé¸æãã¦ãã¾ãã
ããã§ãã1å passenger-install-apache2-module ããã£ã¦ã¿ãã
$ s /var/lib/gems/1.8/bin/passenger-install-apache2-module 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 * Apache 2... found at /usr/sbin/apache2 * Apache 2 development headers... found at /usr/bin/apxs2 * Apache Portable Runtime (APR) development headers... found at /usr/bin/apr-1-config * fastthread... found
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
ã§ãOKããã¨ã¯ããã«æ¸ãã¦ãã LoadModule å®ç¾©ã /etc/apache2/httpd.conf ã«æ¸ãã ãã
ãã¨ã¯ãã©ã¡ã¼ã¿ãªã©ã®èª¿æ´ãå¿
è¦ã
åè
Passengerã®å°å ¥é¢ä¿ã¯ããããããã®ã§ã©ããåèã¨ãããã¨ã¯ãªãã§ããã以ä¸ã«ããã¤ãããã¦ããã¾ãã
- æåã«åèã«ããã®ããã¡ã(âhttp://rails20.jp/2008/04/passenger/)ã§ãããããããããããã§ãã
- ãã¡ã(âPassenger (mod_rails for Apache) を使ってRedmineを動かしてみたよ! - 元RX-7乗りの適当な日々)ãããªãåæã®æ®µéããåèã«ããã¦ããã ãã¦ã¾ãã
- ãã¡ã(âApache上でRuby on Railsアプリケーションを動かす/Passenger(mod_rails for Apache)の利用)ãããã¾ã¨ã¾ã£ã¦ãã¦ããããããã§ãã
- ãã¡ã(â大徳日記 » mod_rails試してみました。)ã¯ãã¼ãã£ã«ãã¹ãã§ã®ããã»ã¹ã«ã¤ãã¦ã®è¨è¿°ãããã¾ãã
- ãã¡ã(âPassenger (mod_rails) を入れてみた | ネコの箱舟 ~Ark the Cats~)ã«ã¯å ¥ãããã¨ã®ã«ã¼ãã£ã³ã°ã®ä¾ãããã¤ãããã¾ãã
- http://d.hatena.ne.jp/koush/20080419/1208569776
- http://bitmap.dyndns.org/blog/archives/001551.html
- http://doruby.kbmj.com/yoppi_on_rails/20080417/Passenger__mod_rails_for_apache_
- http://labs.zsrv.net/content/view/58/44/
- http://brass.to/blog/mod_rails_memory.html