// 下階層用テンプレート
#topicpath
----
//ここにコンテンツを記述します。
JBossは内部にTomcatを同梱していますが、セッションレプリケーションの設定を勉強したので手順をメモっておきます。


**WEBコンテナに名前を付ける [#p3c334ff]
WEBコンテナ1で
${install_root}/server/all/deploy/jbossweb-tomcat55.sar/server.xml
 前: <Engine name="jboss.web" defaultHost="localhost" >
 後: <Engine name="jboss.web" defaultHost="localhost" jvmRoute="tc1">
tc1はWEBコンテナ1に付けた名前。。

同様にWEBコンテナ2で jvmRoute="tc2" などとします。


**mod_jkのダウンロード [#x500bd94]
http://sunsite.tus.ac.jp/pub/apache/tomcat/tomcat-connectors/jk/binaries/linux/jk-1.2.6/

**ディレクトリへのコピー [#vbf55bdb]
 cp -pfr jakarta-tomcat-connectors-jk-1.2.6-linux-fc2-i386-apache-2.0.50.so /etc/httpd/modules/mod_jk.so
 chmod 755 /etc/httpd/modules/mod_jk.so


**workers.propertiesの作成 [#s39710a9]
/etc/httpd/conf/workers.properties を作成します。

#Define tc1
worker.tc1.port=8009
worker.tc1.host=192.168.10.5
worker.tc1.type=ajp13
worker.tc1.lbfactor=1
worker.tc1.local_worker=1
worker.tc1.cachesize=10

# Define tc2
worker.tc2.port=8009
worker.tc2.host=192.168.10.10
worker.tc2.type=ajp13
worker.tc2.lbfactor=1
worker.tc2.local_worker=1
worker.tc2.cachesize=10

# Load-balancing behaviour
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=tc1, tc2
worker.loadbalancer.sticky_session=1
worker.loadbalancer.local_worker_only=1
worker.list=loadbalancer



**httpd.confへconfファイルを追加 [#yfea4693]
最後尾に
 Include conf/mod-jk.conf
と追加しておきます。

** mod-jk.conf の作成 [#x349eb3e]
vi /etc/httpd/conf/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/
JkLogLevel info
# Select the log format
JkLogStampFormat "[%a %b
# JkOptions indicates to send
JkOptions +ForwardKeySize
# JkRequestLogFormat
JkRequestLogFormat "%w %V
JkMount /JBossSamples loadbalancer


----
この記事は
#vote(おもしろかった,そうでもない)

#comment
#topicpath


SIZE(10){現在のアクセス:&counter;}

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