FutureHostingからyumのインストール報告があったので、早速railoをセットアップしました。
1.jdkインストール
cd /root/soft/tmp
chmod 755 jdk-6u13-linux-i586.bin
cd /opt
mkdir soft
cd soft
/root/soft/tmp/jdk-6u13-linux-i586.bin
ln -s jdk1.6.0_13 java
2.Railo解凍
#while still in /opt/soft
tar xzf /root/soft/tmp/railo-3.1.0.012-resin-3.1.2-without-jre.tar.gz
# shortcut to railo
ln -s railo-3.1.0.012-resin-3.1.2-without-jre railo
3.railoインストール
# Change into the Railo directory
cd railo
# configure the compile process
./configure --with-java-home=/opt/soft/java --with-apxs=/usr/sbin/apxs
# build the module
make
# install the module
make install
4.railo正常コンパイルの確認
railoが正常にインストールされたら、/etc/httpd/conf/httpd.conf の最下部に以下の内容が追加されているはず。
LoadModule caucho_module /usr/lib/httpd/modules/mod_caucho.so
ResinConfigServer localhost 6800
CauchoConfigCacheDirectory /tmp
CauchoStatus yes
5.railoのマニュアル起動
/opt/soft/railo/bin/httpd.sh start
6.apache再起動
<!-- change into the apache directory -->
cd /etc/httpd
apachectl -t
<!-- this should display something like: Syntax OK -->
<!-- then we can restart apache -->
/etc/init.d/httpd restart
7.railo自動起動 from Apache
apacheからrailoを自動起動するよう、/etc/httpd/conf.dに以下の内容をcaucho.confとして保存。
パーミッションの設定を0755に変更することを忘れずに!
<Location /caucho-status>
SetHandler caucho-status
</Location>
8.apache経由のrailoコール確認
http://ipaddress/caucho-status
9.ドメイン別railo自動起動設定
/opt/soft/railo/conf/railo.confの266行あたりに、以下の内容を追加してVPS内ドメインからのすべてrailoが起動可能なように設定します。
<host regexp="(.+)">
<host-name>${host.regexp[1]}</host-name>
<root-directory>/var/www/vhosts/${host.regexp[1]}</root-directory>
<web-app id="/" document-directory="httpdocs"/>
</host>
ドメイン別にrailoの起動可否を設定する場合は、以下のようにすればよいと思います。
<host id="sample.domain" root-directory="/var/www/vhosts/sample.domain">
<web-app id="/" document-directory="httpdocs" />
</host>
最近のコメント