13
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Passengerをruby2.0,rails4に対応させる

Last updated at Posted at 2013-04-23

Apache2で動作させる事前提としています。
そして、今回はバージョンアップする場合の手順

sudo su
cd /usr/local/src/
git clone git://github.com/FooBarWidget/passenger.git
cd passenger/
gem build passenger.gemspec
gem install passenger-4.0.0.rc6.gem
passenger-install-apache2-module

soファイルの出力先が表示されますので、控えておく事

/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.0.rc6/libout/apache2/mod_passenger.so

/etc/httpd/conf.d/passenger.conf
# Passengerの基本設定。
# passenger-install-apache2-module --snippet を実行して表示される設定を使用。
# 環境によって設定値が異なりますので以下の3行はそのまま転記しないでください。
#
# ↓ここでsoファイルのパスを記述
LoadModule passenger_module /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.0.rc6/libout/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.0.rc6
PassengerRuby /usr/bin/ruby

# Passengerが追加するHTTPヘッダを削除するための設定(任意)。
#
Header always unset "X-Powered-By"
Header always unset "X-Rack-Cache"
Header always unset "X-Content-Digest"
Header always unset "X-Runtime"

# 必要に応じてPassengerのチューニングのための設定を追加(任意)。
# 詳しくはPhusion Passenger users guide(http://www.modrails.com/documentation/Users%20guide%20Apache.html)をご覧ください。
PassengerMaxPoolSize 20
PassengerMaxInstancesPerApp 4
PassengerPoolIdleTime 3600
PassengerUseGlobalQueue on
PassengerHighPerformance on
PassengerStatThrottleRate 10
PassengerSpawnMethod smart
RailsAppSpawnerIdleTime 86400
RailsFrameworkSpawnerIdleTime 0

httpd再起動

/etc/rc.d/init.d/httpd restart

バージョンアップって大変ですね><

参考

13
12
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?