This is *FAR* from being a good set of instructions. A few of the
scripts are also extremely primitive. All of this applies to RedHat
Linux 7.0.
Please note that I still haven't received confirmation from the
developers of mod_jk if static linking of the module is a technically
sound option.
Here we go:
1. prepare a library libjk.a
Here is the extremely primitive script that you have to run from
<path>/jakarta-tomcat-3.2-src/src/native/apache1.3:
build.lib.sh
---------------------
#!/bin/sh
for i in *.c ../jk/*.c; do
gcc -O2 -c -DLINUX -DLINUX -I../jk -I/usr/local/jdk/include/linux \
-I/usr/local/jdk/include \
-I/usr/src/apache/src/include \
-I/usr/src/apache/src/os/unix $i
done
ar r libjk.a *.o
---------------------
You might get a few warnings from gcc 2.96 about missing newlines.
That's OK. The above paths work on my system. I have Sun's JDK 1.3.0.
Check them out on your system...
2. Create jk in Apache
Something like:
<path>/apache/src/modules/jk
3. Copy the libjk.a into <path>/apache/src/modules/jk
4. Create relevant files in <path>/apache/src/modules/jk
libjk.module:
---------------------
Name: jk_module
ConfigStart
LIBS="-Lmodules/jk -L../modules/jk -L../../modules/jk -ljk -ldl
$LIBS"
RULE_HIDE=yes
ConfigEnd
---------------------
Makefile.tmpl
---------------------
LIB=libjk.a
all: ${LIB}
${LIB}:
${RANLIB} $@
clean:
---------------------
Copy Makefile.libdir from some other module (mod_jserv is OK). Looks
something like this:
---------------------
This is a place-holder which indicates to Configure that it shouldn't
provide the default targets when building the Makefile in this
directory.
Instead it'll just prepend all the important variable definitions, and
copy the Makefile.tmpl onto the end.
---------------------
5. Configure Apache
./configure <existing-config-directives>
--activate-module=src/modules/jk/libjk.a
6. Make and install
make
make install
That should be it. Hope you have success with it.
Bojan
David Bussenschutt wrote:
>
> It's something I'm interested in... do tell!
> THe only reason I have DSO enabled currently is for mod_jk.so
> (I have php,ssl, and all others statically compiled for speed increase)