DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Apache Software Foundation | Jakarta Project | Apache Tomcat
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.

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

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.

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

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.

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


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.

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


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.

  1. In the registry, create a new registry key named "HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\2.0"
  2. 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 )
  3. Add a string value with the name extensionUri and a value of /jakarta/isapi_redirector2.dll
  4. 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 )
  5. Add a string value with the name logLevel and a value for your log level (can be DEBUG, INFO or ERROR).
  6. 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.
  7. 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.

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.