&tag(CentOS6/Apache);
*目次 [#d6b951c8]
#contents
*参考情報 [#vcf1a560]
-[[CentOS6]]

*インストール [#tf006277]
-sakura vpsだと初期状態でインストールされていない。
 # yum install httpd
 # chkconfig httpd on
-Passengerを使うために以下もインストール。
 # yum install http-devel curl-devel

*RVM環境でPassengerを使う [#o27ca633]
-[[RVM環境でRackとPassengerを動かす | Kwappa研究開発室:http://randd.kwappa.net/2010/06/18/175]]よりが参考になる。
**モジュールのインストール [#yeab5ccb]
#pre{{
$ gem install passenger
$ rvmsudo passenger-install-apache2-module
}}
**設定変更 [#bf3724cb]
-/etc/httpd/conf/httpd.confを編集。モジュールインストールの最後で表示された内容をファイルの最後にコピペする。tanaka→ユーザー名。rvmのrubyの名前→インストール時のrvm currentの値となっているはず。
#pre{{
LoadModule passenger_module /home/tanaka/.rvm/gems/ruby-1.9.3-p194@test/gems/passenger-3.0.12/ext/apache2/mod_passenger.so
PassengerRoot /home/tanaka/.rvm/gems/ruby-1.9.3-p194@test/gems/passenger-3.0.12
PassengerRuby /home/tanaka/.rvm/wrappers/ruby-1.9.3-p194@test/ruby                                                                          
}}
-DocumentRootの設定。とりあえずDocumentRootをrubyアプリのpublicディレクトリに設定する。
 DocumentRoot "/var/www/rails/sample/public"
**Rubyアプリの設置 [#q496918a]
-/var/railsに、sampleアプリを設置する。ディレクトリのパーミッションはtanaka.tanaka。パーミッションがおかしいとpermission deniedなんかが表示される。

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS