| Oracle Identity Manager JBoss Application Server用インストレーションおよび構成ガイド リリース9.1.0.1 B52972-02 |
|
![]() 戻る |
![]() 次へ |
JBoss Application Server用のApache Webサーバーを設定するには、次のいずれかの手順を実行します。
|
注意: これらの手順は、参考用にのみ提供されています。JBoss Application ServerのためのApache Webサーバーの設定の詳細は、ApacheまたはJBOSSのドキュメントを参照してください。 |
Microsoft WindowsでApache Webサーバーを設定するには、次のようにします。
|
関連項目: 詳細は、Apache Webサイトを参照してください。 |
Apache2 Webサーバーの最新の配布パッケージをダウンロードし、Apacheサーバーをディレクトリにインストールします。このドキュメントではこのディレクトリをAPACHE_HOMEと記述します。
最新の配布パッケージmod_jk 1.2.xをTomcat Webサイトの「Tomcat connector」セクションのページからダウンロードします。
ライブラリmod_jk.soをAPACHE_HOME\modulesディレクトリにコピーします。
次の行(コメント行も含めて)をAPACHE_HOME\conf\httpd.confファイルの最後に追加して、Apacheがmodjkを使用するように設定します。
# Include mod_jk configuration file
Include conf/mod_jk.conf
APACHE_HOME\confディレクトリに、リクエストをJBoss Application Serverインスタンスに転送するための構成ファイルを作成します。
このファイルにmod_jk.confという名前を付けて、次の行をコピーします。
# Load mod_jk module
# Specify the filename of the mod_jk lib
LoadModule jk_module modules/mod_jk.so
# Where to find workers.properties
JkWorkersFile conf/workers.properties
# Where to put jk logs
JkLogFile logs/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
# JkOptions indicates to send SSK KEY SIZE
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat
JkRequestLogFormat "%w %V %T"
# Mount your applications
JkMount /application/* loadbalancer
# You can use external file for mount points.
# It will be checked for updates each 60 seconds.
# The format of the file is: /url=worker
# /examples/*=loadbalancer
JkMountFile conf/uriworkermap.properties
# Add shared memory.
# This directive is present with 1.2.10 and
# later versions of mod_jk, and is needed for
# for load balancing to work properly
JkShmFile logs/jk.shm
# Add jkstatus for managing runtime data
<Location /jkstatus/>
JkMount status
Order deny,allow
Deny from all
Allow from all
</Location>
Apache Tomcat Connector Documentation Index Webサイトで、次のディレクトリに関するディレクティブの説明を確認してください。
Apacheキャッシュ・サイズに関連するガイドラインを適用します。
APACHE_HOME\confディレクトリに、workers.propertiesという名前のファイルを作成し、次の行を入力します。
# Define list of workers that will be used # for mapping requests worker.list=loadbalancer,status # Define Node1 # modify the host as your host IP or DNS name. worker.node1.port=8009 worker.node1.host=IP of node1 worker.node1.type=ajp13 worker.node1.lbfactor=1 # worker.node1.local_worker=1 (1) worker.node1.cachesize=10 # Define Node2 # modify the host as your host IP or DNS name. worker.node2.port=8009 worker.node2.host= IP of node2 worker.node2.type=ajp13 worker.node2.lbfactor=1 # worker.node2.local_worker=1 (1) worker.node2.cachesize=10 # Load-balancing behavior worker.loadbalancer.type=lb worker.loadbalancer.balance_workers=node1,node2 worker.loadbalancer.sticky_session=0 # worker.loadbalancer.local_worker_only=1 # worker.list=loadbalancer
JBoss Application Serverクラスタに3つ以上のノードが含まれる場合は、APACHE_HOME\confディレクトリのworkers.propertiesファイルにさらに行を追加する必要があります。
たとえば3つのノードがある場合は、次の行を追加する必要があります。
# modify the host as your host IP or DNS name.
worker.node3.port=8009
worker.node3.host= IP of node3
worker.node3.type=ajp13
worker.node3.lbfactor=1
# worker.node3.local_worker=1 (1)
worker.node3.cachesize=10
さらにノードがある場合はそれぞれについて、この一連の行を追加する必要があります。このとき、node3はnode4、node5、node6などに変更してください。
APACHE_HOME\confディレクトリに、uriworkermap.propertiesファイルを作成します。このファイルは、ApacheがTomcatに転送するURLマッピングを含みます。
このファイルによって、mod_jkが、/mx-console、/web-console、/xlWebApp、/xlSchedulerおよび/NexawebからのリクエストをTomcatに転送できるようになります。各行の構文は/url=worker_nameです。作成するファイルに次の例をコピーします。
# Simple worker configuration file
# Mount the Servlet context to the ajp13 worker
/jmx-console=loadbalancer
/jmx-console/*=loadbalancer
/web-console=loadbalancer
/web-console/*=loadbalancer
/xlWebApp=loadbalancer
/xlWebApp/*=loadbalancer
/xlScheduler=loadbalancer
/xlScheduler/*=loadbalancer
/Nexaweb=loadbalancer
/Nexaweb/*=loadbalancer
Apacheを起動するには、APACHE_HOME\binディレクトリにナビゲートして、Apache.exeファイルを実行します。
UNIXでApache Webサーバーを設定するには、次のようにします。
|
関連項目: 詳細は、Apache Webサイトを参照してください。 |
UNIX用のApache 2.0のバイナリ・ファイルをApache Webサイトからダウンロードします。
次のコマンドを実行してApacheをインストールします。
tar xvfz httpd-2.0.54.tar.gz
cd httpd-2.0.54
./configure --prefix=/opt/apache2 --enable-module=so
make
make install
jakarta-tomcat-connectors-1.2.14-src.tar.gzファイルをApache Software Foundation Webサイトからダウンロードします。
次のコマンドを実行してコネクタをインストールします。
tar xzvf jakarta-tomcat-connectors-1.2.14-src.tar.gz
cd jakarta-tomcat-connectors-1.2.14-src/jk/native
chmod 755 buildconf.sh
./buildconf.sh
./configure --with-apxs=/opt/apache2/bin/apxs
make
make install
cd / jakarta-tomcat-connectors-jk1.2.14-src/jk/native/apache-2.0/
cp mod_jk.so /opt/apache2/modules/
「Microsoft WindowsでのJBoss Application ServerのためのApache Webサーバーの設定」で説明した手順4〜8を実行します。
APACHE_HOME/bin/ディレクトリにナビゲートし、次のコマンドを実行します。
./apachectl start