Building mod_jk

Here are the instructions for building mod_jk.

1. Download the source and untar it.

2. Ensure you have Sun Studio compiler in your PATH followed by /usr/ccs/bin. Save the following in 'make_solaris.sh' in the 'native' directory :

#!/bin/sh
INSTALLDIR=/opt/coolstack
APACHEDIR=$INSTALLDIR/apache2
make distclean
PATH=$INSTALLDIR/bin:$PATH
export PATH
./configure --with-apxs=/opt/coolstack/apache2/bin/apxs --with-java-home=/usr/java --with-prefix=$INSTALLDIR
make
make install

3. Go to the 'native' directory and run ./make_solaris.sh

4. Edit your httpd.conf file to include :

  LoadModule jk_module        modules/mod_jk.so

5. Restart the apache httpd server.

Let me know if this doesn't work for you.

Shanti

 

Comments:

If you use apache 2.2, you don't need mod_jk any more. Use the apache 2.2 bundled mod_proxy_ajp instead.

Posted by Thorleif Wiik on May 09, 2007 at 05:07 AM PDT #

mod_proxy_ajp/mod_proxy_balancer are bundled with httpd 2.2: They are easy to use and modproxy_balancer also supports http as a backend protocol. On the other hand mod_jk added a lot of features in the last two years and supports much more complex backend topoloies. If you need to support a complex setup, you might still need to use mod_jk.

Posted by guest on May 09, 2007 at 05:37 AM PDT #

Unfortunately, the apache 2.2 bundled in the coolstack doesn't have mod_proxy_ajp (or any of the mod_proxy modules AFAICT) installed.

Posted by guest on June 06, 2007 at 12:13 AM PDT #

Not Found

The requested URL /dist/tomcat/tomcat-connectors/jk/source/jk-1.2.22/tomcat-connectors-1.2.22-src.tar.gz was not found on this server.
Apache/2.3.0-dev (Unix) Server at www.apache.org Port 80

Posted by D V on August 09, 2007 at 08:21 AM PDT #

Couldn`t find 1.2.22, working with 1.2.23 :

/opt/coolstack/apache2/build/libtool --silent --mode=compile gcc -I/opt/coolstack/apache2/include -g -O2 -DSSL_EXPERIMENTAL -DSSL_ENGINE -O3 -DHAVE_APR -I/opt/coolstack/apache2/include -I/opt/coolstack/apache2/include -g -O2 -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_LARGEFILE64_SOURCE -I /usr/java/include -I /usr/java/include/ -c jk_ajp12_worker.c -o jk_ajp12_worker.lo
libtool: compile: unable to infer tagged configuration
libtool: compile: specify a tag with `--tag'
\*\*\* Error code 1
make: Fatal error: Command failed for target `jk_ajp12_worker.lo'
Current working directory /root/mod_jk/tomcat-connectors-1.2.23-src/native/common
\*\*\* Error code 1

Posted by D V on August 09, 2007 at 09:12 AM PDT #

Which platform are you building on ? If on sparc, you need the Sun Studio 11 compilers in your PATH. On x86, you need /usr/sfw/bin in your PATH for gcc.

Shanti

Posted by Shanti on August 09, 2007 at 09:24 AM PDT #

I just rebuild the latest mod_jk (1.2.25) on x86 without any problems. I've updated the link to 'source' to just point to the source dir and explained what PATH should be. Most of the problems with builds seem to be incorrect compilers and/or PATHs. Ensure you have all of the patches for Studio as well. Alternatively, try using Studio 12 - that works as well.

Posted by Shanti on August 13, 2007 at 05:00 AM PDT #

I have downloaded tomcat-connectors-1.2.25-src.tar.gz from the link provided here
Here are environment details - Solaris 9 Sparc, apache 1.3 and Tomcat 4
In the make_solaris.sh i have modified the apache paths accordingly.
Sun studio 10 path comes before /usr/ccs/bin in PATH env variable.

Following things are failing
1. make distclean (Target is not available)
2. After removing the above line, configure command is not working. As a result no make files are generated.

I am new to C.

Please let me know if you want any more info.
Thanks in advance for the help

Vinay

Posted by Vinay on October 08, 2007 at 10:25 PM PDT #

I was wondering if you have such a good way to build mod_jk for Windows. I need to work on this and make a connector which delegates services to Tomcats not according to load but Primary-Secondary ways...

Posted by AJ on February 28, 2008 at 05:04 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

I'm a Senior Staff Engineer in the Performance & Applications Engineering Group (PAE). This blog focuses on tips to build, configure, tune and measure performance of popular open source web applications on Solaris.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today