The Java Apache Project

How to install Apache JServ on UNIX systems

Requirements

The following requirements exist for building Apache JServ:

Choose how to add the Apache JServ module to Apache

There are two choices:

Configure Apache First - IMPORTANT

If you are using a source distribution then you have to configure Apache first (some generated header files are needed for Apache JServ to pass its configure checks). You do not need to worry about specifying the Apache JServ module for this first run.

Thus, a first time configure line to build a static version of Apache would look like this:

./configure \
--prefix=/usr/local/apache
make install

If you are using DSO then you can ignore this step. If you have a source distribution and would like to build it with DSO support and install it for use by Apache JServ then use the following options when configuring Apache:

--enable-rule=SHARED_CORE --enable-module=so

Thus, a first time configure line to build a DSO version of Apache would look like this:

./configure \
--prefix=/usr/local/apache \
--enable-rule=SHARED_CORE \
--enable-module=so
make install

Configure Apache JServ

Now you are ready to configure Apache JServ. To do this you may (or may not) need to specify quite a few arguments to configure. The options to pass to Apache JServ's configure are described below with complete examples at the very bottom of this section.

Build Apache and Apache JServ

Once you have configured Apache JServ you can run make.

Run 'make install' to make a .jar file, and copy it and the docs into the directory you specified as --prefix. If you are building the DSO version, this will compile the shared object. If you are building the static version, this will just build the Java classes.

If you are using an Apache source distribution then you also have to run 'make install' in the Apache source directory to build Apache with Apache JServ support in it. To do this, you will need to add the following line to the static configure line in section 3 above:

--activate-module=src/modules/jserv/libjserv.a

This is an example of building a default Apache installation with Apache JServ support added:

./configure \
--prefix=/usr/local/apache
--activate-module=src/modules/jserv/libjserv.a
make install

You can see if Apache has loaded the mod_jserv module by executing '/path/to/apache/installation/bin/httpd -l'.

Configuration Files

At this point, you must configure the Apache JServ directives for Apache. There are example configuration files in the conf and example directories that come with the Apache JServ package that help with this process. The files in the example directory will help you configure a default zone named "example" so that your URL's will look like this:

<http://www.yourserver.com/example/Hello>

There are three different types of configuration files for Apache JServ, the first one should be included in your httpd.conf file with the Apache "Include" directive. For example, in your httpd.conf file, you should have a line like this: "Include /path/to/jserv.conf".

Within your "jserv.conf" file, there is a line that gives the path to the second type of configuration file, the "jserv.properties" file. The line in the jserv.conf file looks like this: "ApJServProperties /path/to/jserv.properties".

Lastly, within the "jserv.properties" file is a line that points to your zone configuration file. If you have a zone called "example", then you will need to have an "example.properties" file and the location to this file is then defined with this line in your "jserv.properties" file: "example.properties=/path/to/file/example.properties"

Thus, the configuration file path looks like this:

"->" sounds like "points to"

httpd.conf -> jserv.conf -> jserv.properties -> example.properties

You should make sure to edit all of these files and fill in the appropriate information according to the comments provided in each of the files. If you have questions about the definitions, you should consult section 8 below, the documentation in the docs directory, on the website, FAQ-O-Matic and/or the Java Apache Users mailing list.

Problems

First, look in the various log files for errors. If you are not getting log files created, then this is generally a result of incorrect permissions on the log files. Make sure that the user (ie: nobody) that the Apache httpd is running as can write to the log files.

Next, read the FAQ-O-Matic and documentation to see if your issues have already been covered (there is a good chance that they have been).

http://java.apache.org/faq/

Configuration errors and questions are not considered bugs and those should be directed to the Java Apache Users mailing list.

http://java.apache.org/main/mail.html

If think that you have found a bug, please report it to the Apache Bug Database at:

http://bugs.apache.org/

Copyright (c) 1997-99 The Java Apache Project.
$Id: howto.unix_install.html,v 1.9 1999/12/10 23:25:45 admin Exp $
All rights reserved.