Installation |
インストール |
The actual build mechanism creates the dso files in the
build/jk2/${servername} subdirectory of the jakarta-tomcat-connectors/jk.
When configure --with-jni is used 2 dso files are created.
These files have to be copied in the right location of the web server
installation.
実際の構築手順では、jakarta-tomcat-connectors/jk のサブディレクトリ
build/jk2/${servername} の中に Dynamic Shared Object(DSO) ファイルを作成します。
configure コマンドの実行時に --with-jni オプションが使われると 2 つの DSO ファイルが作成されます。
これらのファイルは、Web サーバのインストールにしたがって正しい場所にコピーしなければいけません。
JNI support in JK2 require APR, which is provded in Apache 2.0, and is
available for many platforms, so Apache 1.3, IIS and NES/iPlanet should be
able to use it
JK2 における JNI サポートには Apache Portable Runtime (APR) モジュールが必要です。
APR は Apache 2.0 で提供されており、多くのプラットフォームで利用できます。
したがって Apache 1.3、IIS 、NES/iPlanet でも APR を使えるはずです。
Apache 1.3 |
Apache 1.3 |
In the following example Apache-1.3 is installed in
/home/apache13/ and the commands are executed in
the jakarta-tomcat-connectors directory.
以下の例では、/home/apache13/ 以下に Apache-1.3 がインストールされており、
jakarta-tomcat-connectors ディレクトリでコマンドを実行しているものとします。
Apache 1.3 require APR, and if APR has been built with pthread support
and your Apache 1.3 wasn't (general case in Unix platforms) you should :
-
Rebuild Apache 1.3 with pthread support (recommanded)
-
Add the LoadFile /usr/lib/pthread.so in beginning of your httpd.conf
Apache 1.3 では APR が必要です。もし APR が pthread 対応でビルドされており、
Apache 1.3 が pthread 対応でなければ(たいていの UNIX プラットフォームの場合)、
以下のどちらかの対処が必要になります。
-
Apache 1.3 を pthread 対応にリビルド(推奨)
-
httpd.conf の最初に LoadFile /usr/lib/pthread.so を追加
You should also ensure that the linker will be able to locate the apr shared libraries,
libapr.so, and libaprutil.so, make sure they have been installed
in linker search locations.
また、リンカ(linker)が apr の共有ライブラリを確実に探し出せるようにしておかなければいけません。
libapr.soとlibaprutil.soがリンカの検索パスにインストールされていることを確かめてください。
|
Copy the dso files in the modules location:
[user@host] ~ $
cp jk/build/jk2/apache13/mod_jk2.so /home/apache13/modules
Copy jkjni.so if you're using JNI
[user@host] ~ $
cp jk/build/jk2/apache13/jkjni.so /home/apache13/modules
You may have to add pthread library in the httpd.conf:
LoadFile /usr/lib/pthread.so
Add mod_jk2 loading in the httpd.conf
LoadModule jk2_module modules/mod_jk2.so
|
|
DSO ファイルをmodulesディレクトリにコピーします。
[user@host] ~ $
cp jk/build/jk2/apache13/mod_jk2.so /home/apache13/modules
JNI を利用するなら、jkjni.so をコピーします。
[user@host] ~ $
cp jk/build/jk2/apache13/jkjni.so /home/apache13/modules
httpd.conf に pthread ライブラリに関する記述を追加する必要があるかもしれません。
LoadFile /usr/lib/pthread.so
httpd.conf に mod_jk2 をロードするように追加します。
LoadModule jk2_module modules/mod_jk2.so
|
Apache 2 |
Apache 2 |
In the following example Apache-2.0 is installed in
/home/apache20/apache40 and the commands are executed in
the jakarta-tomcat-connectors directory.
以下の例では、/home/apache20/apache40 以下に Apache-2.0 がインストールされており、
jakarta-tomcat-connectors ディレクトリでコマンドを実行しているものとします。
|
Copy the dso files in the modules location:
[user@host] ~ $
cp jk/build/jk2/apache2/mod_jk2.so /home/apache20/apache40/modules
Copy jkjni.so if you're using JNI
[user@host] ~ $
cp jk/build/jk2/apache2/jkjni.so /home/apache20/apache40/modules
Add mod_jk2 loading in the httpd.conf:
LoadModule jk2_module modules/mod_jk2.so
|
|
DSO ファイルをmodulesディレクトリにコピーします。
[user@host] ~ $
cp jk/build/jk2/apache2/mod_jk2.so /home/apache20/apache40/modules
JNI を利用するなら、jkjni.so をコピーします。
[user@host] ~ $
cp jk/build/jk2/apache2/jkjni.so /home/apache20/apache40/modules
httpd.conf に mod_jk2 をロードするように追加します。
LoadModule jk2_module modules/mod_jk2.so
|
IIS |
IIS |
A pre-built version of the ISAPI redirector server plugin, isapi_redirector2.dll,
is available under the win32/i386 directory of jakarta-tomcat-connectors distribution.
You can also build a copy locally from the source present in jakarta-tomcat-connectors
distribution. The Tomcat redirector requires three entities:
-
isapi_redirector2.dll
- The IIS server plugin, either obtain a pre-built DLL or build it yourself (see the build section).
-
workers2.properties
- A file that describes the host(s) and port(s) used by the workers (Tomcat processes).
A sample workers2.properties can be found under the conf directory.
-
jk2.properties
- A configuration file used by mod_jk2 on the Tomcat side.
ISAPI リダイレクタ・サーバ・プラグインである isapi_redirector2.dll のビルド済みバージョンは、
jakarta-tomcat-connectors 配布の win32/i386 ディレクトリの下にあります。
jakarta-tomcat-connectors 配布のソースを元にローカルコピーをビルドすることもできます。
Tomcat リダイレクタには、以下の 3 つのファイルが必要です。
-
isapi_redirector2.dll
- IIS サーバ・プラグイン。ビルド済み DLL か自分でビルドして(ビルドの章を参照)入手します。
-
workers2.properties
- ワーカ(Tomcat プロセス)によって利用される、ホストやポートを記述するファイル。
サンプル の workers2.properties は conf ディレクトリにあります。
-
jk2.properties
- Tomcat 側の mod_jk2 で使われる設定ファイル。
- In the registry, create a new registry key named
"HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\2.0"
-
Add a string value with the name
serverRoot
and a value which is a full path
to your Tomcat installation (for example
c:\jakarta-tomcat
)
-
Add a string value with the name
extensionUri
and a value of
/jakarta/isapi_redirector2.dll
-
Add a string value with the name
workersFile
and a value which is the full path
to your workers2.properties file (for example
c:\jakarta-tomcat\conf\workers2.properties
)
-
Add a string value with the name
logLevel
and a value for your log level
(can be DEBUG, INFO or ERROR).
- Using the IIS management console, add a new virtual directory to your IIS web site.
The name of the virtual directory must be jakarta.
Its physical path should be the directory where you placed isapi_redirector2.dll
While creating this new virtual directory assign it with execute access.
-
Using the IIS management console, add isapi_redirector2.dll as a filter in your IIS web site.
The name of the filter should reflect its task (I use the name jakarta),
its executable must full path to the isapi_redirector2.dll.
- Windows レジストリに
"HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\2.0"
の名前の新しいレジストリキーを作ります。
-
文字列の値を追加します。名前は
serverRoot
で、値は Tomcat がインストールされている場所を絶対パスで指定します。
(例えば、
c:\jakarta-tomcat
)
-
文字列の値を追加します。名前は
extensionUri
で、値は
/jakarta/isapi_redirector2.dll
を指定します。
-
文字列の値を追加します。名前は
workersFile
で、値は workers2.properties ファイルを絶対パスで指定します。
(例えば、
c:\jakarta-tomcat\conf\workers2.properties
)
-
文字列の値を追加します。名前は
logLevel
で、値はログレベル(DEBUG、INFO、ERROR のいずれか)を指定します。
- IIS 管理コンソール(インターネットサービスマネージャ)を使って、
IIS Web サイトに新しい仮想ディレクトリを追加します。
仮想ディレクトリの名前は
jakarta
でなければいけません。
仮想ディレクトリの物理パスは、isapi_redirector2.dll を置いたディレクトリでなければいけません。
この仮想ディレクトリを作成する時に、実行権限を割り当てます。
-
IIS 管理コンソールを使って、IIS Web サイトに isapi_redirector2.dll をフィルタとして追加します。
フィルタの名前は、そのタスクを反映したものがいいでしょう(私は jakarta の名前を使ってます)。
フィルタの実行ファイルには、isapi_redirector2.dll の絶対パスを指定しなければいけません。
That's all, you should now start Tomcat and ask IIS to serve you the /examples context.
Try
http://localhost/examples/jsp/index.html
for example and
execute some of the JSP examples.
設定はこれだけです。あとは Tomcat を起動して、/examples コンテキストを送るようにIISに要求してみてください。
http://localhost/examples/jsp/index.html
にアクセスし、
JSP の例題をいくつか試してみましょう。
|