Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fixed bad links and formatting

...

  1. Download the jakarta-tomcat-connectors package
  2. install httpd-devel and httpd RPMs
  3. Ensure you have libtool, gcc and the various build tools
  4. go into the jakarta-tomcat-connectors/jk/ directory
    1. edit build.properties. Set "apache2.home" to /usr and "apache2.include" to /usr/include/httpd.
    2. if you have apache13 installed in a separate dir - set apache13.home=DIR, otherwise set it to "none"
    3. if you are on gentoo - apache2.include will be /usr/include/apache2
    4. if you built your own apache - it must be APACHE/include
    5. On redhat8Red Hat 8, make a symlink between /usr/lib/libapr.so to /usr/lib/libapr-0.so ( the "right" name )

...

  1. See note (below) regarding some changes you may need to make to a Makefile
  2. go into the jk/native2 directory
  3. type ./buildconf.sh
  4. type ./configure --with-apxs=(location of your apxs installed by apache-devel)
    1. an actual sample configure:./configure --with-apxs2=/usr/sbin/apxs --with-apache2-lib=/usr/lib --with-tomcat41=/usr/local/tomcat-4 --with-apr-lib=/usr/lib --with-jni
  5. type make
    1. mod_jk2.so and libjkjni.so will be in jk/build/jk2/apache2/
    2. instructions on using libtool to finish are emitted at the end of the make process

...

In native2/server/apache/Makefile.in, find the line:

No Format
  
JK_LDFLAGS=-L${APACHE2_LIBDIR} -lcrypt -lapr-0 <at:var at:name="PCRE_LIBS" /> 

In order to compile and run on my RedHat Red Hat 8.0 installation the following changes are required:

No Format
  
JK_LDFLAGS=-L${APACHE2_LIBDIR} -lcrypt -lapr-0 '''-laprutil -lgdbm -lexpat -ldb''' <at:var at:name="PCRE_LIBS" /> 

The changes are in bold. The changes are only necessary if you actually intend to use jkini.so, e.g., for UNIX domain sockets.unmigrated-wiki-markup

\[NOTE: this was to build with the *RH 8 binary distribution of Apache*, which provides libapr. Notice the difference between what RH 8 distributes, and an official Apache distribution of 2.0.44:

No Format
 
1356728 Feb 16 23:45 httpd-2.0.44/srclib/apr/.libs/libapr-0.so.0.9.2 
  772970 Feb 16 23:46 httpd-2.0.44/srclib/apr-util/.libs/libaprutil-0.so.0.9.2
No Format
 
  205700 Oct 9 08:04  /usr/lib/libapr.so.0.0.0 
  102532 Oct 9 08:04  /usr/lib/libaprutil.so.0.0.0 

...


You should also replace "jkjni" with "libjkjni".

...

Configuration

...

See \[Self:Tomcat/Jk2Connector | (Using the JK2 Connector\])