passenger (旧mod_rails)をcentos5.2に仕込む
前準備
ruby1.8.6使いたい人は手で入れた方がよいとおもう。
# yum install gcc gcc-c++ ruby ruby-devel ruby-rdoc
- apache入れる
2.2系の最新(2.2.9とか)使いたい人は手で入れるよろし。
# yum install httpd httpd-devel
devel 入れないと passenger のインストーラにおこられます
自動起動するようにしとく。
# chkconfig httpd on
- gem 入れる。外部レポジトリは好きじゃないので生で。
# wget http://rubyforge.org/frs/download.php/38646/rubygems-1.2.0.tgz # tar xvzf rubygems-1.2.0.tgz # cd rubygems-1.2.0 # ruby ./setup.rb
- passenger入れる。
# gem install passenger
g++ ないと怒られるよ。最近c++モノ増えたなぁ。依存関係にあるのもいれる。
- passengerの設定をする。
# passenger-install-apache2-module
Welcome to the Phusion Passenger Apache 2 module installer, v2.0.2. 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... * 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/httpd * Apache 2 development headers... found at /usr/sbin/apxs * Apache Portable Runtime (APR) development headers... found at /usr/bin/apr-1-config * fastthread... found * rack... found
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
完了
サンプルはこうやるらしい
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
いじょう。
気が向いたら何かdeployします。