tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Turner <tomcat-u...@johnturner.com>
Subject Re: Apache 2 - Tomcat 4 - mod_jk2 - Redhat 9
Date Fri, 16 May 2003 20:41:30 GMT

You da Man, Mark.

John

On Fri, 16 May 2003 13:22:46 -0700 (PDT), Mark Eggers 
<its_toasted@yahoo.com> wrote:

> Rick,
>
> In general, building stuff with Redhat's Apache RPM is
> a pain, since they've scattered the files all over the
> place after building the software.  This means that
> apxs has no clue where things are.
>
> I agree with John, in that the first thing you should
> do is uninstall the Apache RPM, the apache-dev rpm,
> and the apache user and group as well.
>
> Also, Redhat 9 has the GNU Java compiler installed. You'll need to move 
> /usr/bin/[jar,rmic,rmiregistry]
> out of your path.
>
> Sun's j2sdk 1.4.1_02 has some issues with Redhat Linux
> 9, so you'll need to go with the 1.4.2-beta.  I
> install both in /usr/<j2sdk-version>, and then link
> the one I want to /usr/java.
>
> Finally, put /usr/java/bin in the PATH variable, and
> set JAVA_HOME to /usr/java.
>
> Next, download the binary package of Tomcat.  I use
> 4.1.24 - the full edition.  I usually create a Tomcat
> user, and install Tomcat there.  Set CATALINA_HOME and
> TOMCAT_HOME to point to the root of the install
> (/home/tomcat in my case).
>
> Get the source for Apache 2.0.45, uncompress, and
> untar it.  Now set CPPFLAGS=-I/usr/kerberos/include,
> since Redhat places the Kerberos headers in a
> nonstandard place.
>
> With Redhat 9, I could not get a custom layout to
> work, so just edited the <Layout Apache></Layout> in
> config.layout to suit my needs.  Like for Tomcat, I
> created an apache user with its directory in
> /home/apache.
>
> Now you can configure and build the web server.  I
> used the following to configure the web server:
>
> ./configure --with-modules=all \
> --with-shared=most \
> --with-module=ssl \
> --with-mods-shared=ssl
>
> mod_ssl is not included in --with-modules=all, so you
> have to specify that separately.
>
> Then you can do the make, and make install.  Be sure
> to change the ownership of the files after make
> install to reflect your apache user.  Also, the user
> nobody is really limited in Redhat 9 and doesn't
> appear to work like you would expect.  I set up an
> apache-run user that has the same group membership,
> but no write permissions to /home/apache (except for
> the logs).
>
> Now finally, you can build the mod_jk2 connector. Here's a quick HOWTO 
> for that:
>
> 1. Download
> jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz from
> http://jakarta.apache.org/builds/jakarta-tomcat- 
> connectors/jk2/release/v2.0.2/src/
>
> 2. Uncompress it and extract the tar file.
>
> 3. cd to
> jakarta-tomcat-connectors-jk2-2.0.2-src/jk/native2
>
> 4. chmod u+x configure
>
> 5. Run configure with:
>
> ./configure
> --with-apxs2=<apache-root-directory>/bin/apxs \
> --with-tomcat41=<tomcat-root-directory> \
> --with-java-home=<java-root-directory> \
> --with-jni \
> --with-pcre
>
> For example:
>
> ./configure --with-apxs2=/home/apache/bin/apxs \
> 	      --with-tomcat41=/home/tomcat \
> 	      --with-java-home=/usr/java \
> 	      --with-jni \
> 	      --with-pcre
>
> 6. Run make
>
> 7. The two .so files (mod_jk2.so and jkjni.so) will be
> in:
> jakarta-tomcat-connectors-jk2-2.0.2-src/jk/build/jk2/apache2
>
> 8. Copy those to files to
> <apache-root-directory>/modules with the proper
> permissions.
>
> 9. Configure and restart
>
> Finally, here are minimal jk2.properties (in
> $TOMCAT_HOME/conf) and workers2.properties (in
> <apache-root-directory>/conf) files that will set up a
> socket connection between Tomcat and Apache.
>
> # jk2.workers
> # Socket configuration
> #
> handler.list=request,container,channelSocket
>
> #
> # socket configuration
> #
> channelSocket.port=8009
> channelSocket.address=127.0.0.1
> channelSocket.maxPort=port+10
>
> #
> # workers2.properties
> #
>
> [shm]
> file=/home/apache/logs/shm.file
> size=1048576
>
> [workerEnv:]
> info=Global server options
> timing=1
> debug=0
>
> # Example socket channel, override port and host.
> [channel.socket:localhost:8009]
> port=8009
> host=127.0.0.1
>
> # define the worker
> [ajp13:localhost:8009]
> channel=channel.socket:localhost:8009
>
> # define the worker
> [status:status]
>
> # Uri mapping
> [uri:/jkstatus/*]
> worker=status:status
>
> # Uri mapping
> [uri:/examples/*.jsp]
> worker=ajp13:localhost:8009
>
> # [uri:/examples/servlet/*]
> worker=ajp13:localhost:8009
>
> You'll need an Alias directive in httpd.conf to catch
> html, images, etc. from the Tomcat examples.
>
> I apologize for the length of this message, but there
> is a lot of ground to cover.
>
> HTH
>
> /mde/
> just my two cents . . . .
>
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> http://search.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message