tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luke Vanderfluit <l...@chipcity.com.au>
Subject Re: Problem building mod_jk2 on Freebsd 4.8-RELEASE
Date Sun, 07 Sep 2003 20:53:13 GMT
Hi Dean,

I have the same Apache and Tomcat versions on Redhat 9.

I'm not sure if setup is the same but what I did was a lot shorter and
worked, no probs,
first you need the jk2 connectors file

jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz

untar it somewhere, then cd to the jk/native2 directory

and do:
./configure --with-apxs2=/usr/local/apache2/bin/apxs \
--with-tomcat41=/usr/local/tomcat/jakarta-tomcat-4.1.27 \
--with-apache2-lib=/usr/local/apache2/lib \
--with-apr-lib=/usr/local/apache2/lib --with-jni 

then
make,

then
cp build/jk2/apache2/mod_jk2.so /usr/local/apache2/modules/
cp build/jk2/apache2/jkjni.so /usr/local/apache2/modules/

then 
##################
from tomcat-docs/jk2/jk2/confighowto.html
#####################
Minimum configuration is the simplest one to make the JK2 working. The
used channel will be socket, and lot of options are used by default.
Both the Tomcat and web server are on the same computer.

jk2.properties:


# The default port is 8009 but you can use another one
# channelSocket.port=8019
That is all needed on the Tomcat side to configure the JK2. 

workers2.properties:


# Define the communication channel 
[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
tomcatId=localhost:8009

# Map the Tomcat examples webapp to the Web server uri space
[uri:/examples/*]
info=Map the whole webapp

Start the Tomcat and Web server and browse to the
http://localhost/examples/
#######################################

for me that worked
hope this helps,

kind regards,
Luke


On Mon, 2003-09-01 at 16:13, Dean Searle wrote:
> Hello All!
> 
> I am new to this mailing list and somewhat new to Apache and Tomcat. I
> recently have rebuilt my server from the ground up and need to rebuild
> mod_jk2.
> 
> Here is what I have so far:
> 
> Freebsd 4.8 Release
> Apache 2.0.47
> Tomcat 4.1.27
> Ant 1.5.4
> JDK 1.4.1p3_3
> 
> I was following the instructions outline in the book called "Tomcat: The
> Definitive Guide" by O'Reilly:
> 
> ---BEGIN SNIPPET---
> 
> 
> 1. Download a new source code release of jakarta-tomcat-connectors from
> http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release.
> 
> 2. Unpack the archive and change directory into the new
> jakarta-tomcat-connectors source directory:
> # gunzip jakarta-tomcat-connectors-4.1.24-src.tar.gz
> # tar xvf jakarta-tomcat-connectors-4.1.24-src.tar
> # cd jakarta-tomcat-connectors-4.1.24-src
> 
> 3. Make sure that your PATH environment variable points to the bin/
> directory of the latest release of Apache Ant. Download Ant
> from http://ant.apache.org and add $ANT_HOME/bin to your PATH if you
> haven't already:
> # PATH=$PATH:/usr/local/apache-ant-1.5.2
> # export PATH
> # which ant
> /usr/local/apache-ant-1.5.2/bin/ant
> 
> 4. Make sure that your JAVA_HOME environment variable is set and points
> to your JDK:
> # JAVA_HOME=/usr/local/jdk1.3.1_02
> # export JAVA_HOME
> # echo $JAVA_HOME
> /usr/local/jdk1.3.1_02
> 
> 5. Create a usable copy of the util/build.properties file:
> # cp util/build.properties.sample util/build.properties
> 
> 6. Create a usable copy of the jk/build.properties file:
> # cp jk/build.properties.sample jk/build.properties
> 
> 7. Edit the new jk/build.properties file, changing only the lines that
> apply to the Tomcat and Apache httpd versions that you have
> and want to use. For example, if you have Tomcat 4.1 and Apache httpd 2,
> change the following lines to point to where yours
> are installed (leave everything else in this file alone):
> tomcat41.home=/usr/local/jakarta-tomcat-4.1.24
> apache2.home=/usr/local/apache2
> 
> 8. Create a usable copy of the coyote/build.properties file:
> # cp coyote/build.properties.sample coyote/build.properties
> 
> 9. Edit the new coyote/build.properties file, changing the value of
> catalina.home to point to your Tomcat installation directory:
> catalina.home=/usr/local/jakarta-tomcat-4.1.24
> 
> 10. Run ant from the top level of the jakarta-tomcat-connectors source
> directory to build mod_jk2 and the Java side of the
> connector:
> # cd /usr/local/jakarta-tomcat-connectors-4.1.24-src
> # ant
> 
> 11. If you're building on Linux, copy the linux headers into the root of
> the JDK's include directory (this will allow you to avoid a
> known build problem with mod_jk2 and Linux):
> # cd $JAVA_HOME/include
> # cp linux/* .
> 
> 12. Build mod_jk2 by calling the native build target from within the jk
> directory:
> # cd jk
> # ant native
> 
> ---END SNIPPET---
> 
> When I ran "ant native" here is the response I get:
> 
> fbsd2# ant native
> Buildfile: build.xml
> 
> jkant:
>     [mkdir] Created dir:
> /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/build/class
> es
>     [mkdir] Created dir:
> /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/build/class
> es/META-INF
>     [mkdir] Created dir:
> /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/build/lib
>     [javac] Compiling 17 source files to
> /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/build/class
> es
>      [copy] Copying 1 file to
> /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/build/class
> es/META-INF
>       [jar] Building jar:
> /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/build/lib/j
> kant.jar
> 
> detect:
>      [echo] -------- jakarta-tomcat-connectors --------
> 
> report:
>      [echo] Tomcat33: ${tomcat33.detect}
> ./../jakarta-tomcat/build/tomcat
>      [echo] Tomcat40:  ${tomcat40.detect} ../../jakarta-tomcat-4.0/build
>      [echo] Tomcat41: true /usr/local/jakarta-tomcat4.1
>      [echo] Tomcat5:  ${tomcat5.detect} ../../jakarta-tomcat-5/build
>      [echo] Apache13: ${apache13.detect} /opt/apache13
>      [echo] Apache2: true /usr/local
>      [echo] iPlanet:  ${iplanet.detect} /opt/iplanet6
>      [echo] IIS:      ${iis.detect} ${iis.home}
> 
> native:
> 
> init:
>      [echo] /root
>     [mkdir] Created dir:
> /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/build/jk
> 
> apache20:
>     [mkdir] Created dir:
> /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/build/jk/ap
> ache2
>        [so] Compiling 19 out of 19
> Compiling
> /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/native/comm
> on/jk_msg_buff.c
> Compiling
> /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/native/comm
> on/jk_ajp13_worker.c
> Compiling
> /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/native/comm
> on/jk_md5.c
>        [so] Compile failed 1
> /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/native/comm
> on/jk_md5.c
>        [so] Command:libtool --mode=compile cc -c -o
> /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/build/jk/ap
> ache2/common/jk_md5.o
> -I/usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/native/co
> mmon -I/usr/local/include -I/usr/local/jdk1.4.1/jre/../include -g -W
> -D_REENTRANT -DCHUNK_SIZE=4096 -DREUSE_WORKER -DUSE_APACHE_MD5
> /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/native/comm
> on/jk_md5.c
>        [so] Output:
>        [so]  cc -c
> -I/usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/native/co
> mmon -I/usr/local/include -I/usr/local/jdk1.4.1/jre/../include -g -W
> -D_REENTRANT -DCHUNK_SIZE=4096 -DREUSE_WORKER -DUSE_APACHE_MD5
> /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/native/comm
> on/jk_md5.c  -fPIC -DPIC -o
> /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/build/jk/ap
> ache2/common/.libs/jk_md5.o
>        [so] StdErr:
>        [so]
> /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/native/comm
> on/jk_md5.c:477: httpd.h: No such file or directory
>        [so]
> /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/native/comm
> on/jk_md5.c:478: http_config.h: No such file or directory
>        [so]
> /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/native/comm
> on/jk_md5.c:490: ap_md5.h: No such file or directory
> 
> BUILD FAILED
> file:/usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/native
> /build.xml:134: Compile failed
> /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/native/comm
> on/jk_md5.c
> 
> Total time: 7 seconds
> 
> 
> ---END SNIPPET---
> 
> Am I missing something here or have I done something completely wrong?
> 
> I apologize for the length of this email.
> 
> Any help is appreciated. If you require more information please let me
> know.
> 
> Thank you in advance.
> 
> Dean Searle
> Computing Oasis
> 989.245.7369 (p)
> 989.921.3904 (f)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
-- 
====================================
"when my computer smiles, I'm happy"
===============================.~ ~,
Luke Vanderfluit               |'/']
Mobile: 0421 276 282            \~/`


Mime
View raw message