You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by la...@apache.org on 2001/03/12 22:09:36 UTC
cvs commit: jakarta-tomcat/src/native/mod_jk/common jk_global.h jk_pool.h jk_worker_list.h
larryi 01/03/12 13:09:35
Modified: src/native/mod_jk/apache1.3 build-solaris.sh
src/native/mod_jk/common jk_global.h jk_pool.h
jk_worker_list.h
Added: src/native/mod_jk/apache1.3 README.hpux README.solaris
build-hpux-cc.sh build-hpux.sh
Log:
Update Solaris build script and add readme file.
Add HP-UX 11 build files and related updates to header files in the common
directory.
Submitted by: Mike Braden
Revision Changes Path
1.2 +24 -17 jakarta-tomcat/src/native/mod_jk/apache1.3/build-solaris.sh
Index: build-solaris.sh
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/native/mod_jk/apache1.3/build-solaris.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- build-solaris.sh 2001/03/02 18:25:41 1.1
+++ build-solaris.sh 2001/03/12 21:09:20 1.2
@@ -1,24 +1,31 @@
#!/bin/sh
# build-solaris.sh for mod_jk.so
+#
# Usage: # sh build-solaris.sh
+# for Solaris 8 using GNU gcc
+# Note: See README-solaris for details.
+#
+# Mike Braden
+# March 05, 2001
-# Path to Apache or PREFIX used to build Apache
-if [ -z "$APACHE_HOME" ] ; then
- echo APACHE_HOME=/usr/local/apache
- APACHE_HOME=/usr/local/apache
-fi
+# Update the following according to your installation
+APACHE_HOME=/usr/local/apache
+JAVA_HOME=/usr/java
+
+#### End of configuration - do not change below
+
if [ -f $APACHE_HOME/bin/apxs ] ; then
APXS=$APACHE_HOME/bin/apxs
else
- echo Error: Unable to locate apxs. Verify that APACHE_HOME is correct in this script.
+ echo Error: Unable to locate apxs.
+ echo Verify that APACHE_HOME is set correctly in this script.
exit 1
fi
-
-# Check JAVA_HOME
-if [ -z "$JAVA_HOME" ] ; then
- echo Please set JAVA_HOME
+if [ ! -d $JAVA_HOME/include/solaris ] ; then
+ echo Error: Unable to locate Java libraries.
+ echo Verify that JAVA_HOME is set correctly in this script.
exit 1
fi
@@ -27,8 +34,8 @@
INCLUDE="-I../common $JAVA_INCLUDE"
SRC="../common/*.c mod_jk.c"
-# Run APXS to compile module
-echo Compiling mod_jk
+# Run APXS to compile the mod_jk module and its components
+echo Building mod_jk
$APXS -S CFLAGS="-DSOLARIS -DUSE_EXPAT -I../lib/expat-lite" -o mod_jk.so $INCLUDE -lposix4 -c $SRC
# Check to see if the last command completed
@@ -45,7 +52,7 @@
rm jk_*.o
rm mod_jk.o
-echo configuring apache...
+echo Configuring apache...
# Use apxs to add the correct lines to httpd.conf
# Since our auto-config does this in the include
@@ -69,7 +76,7 @@
To finish the installation, edit your apache/conf/httpd.conf file and
add the following line to the end of the file:
-(Note: Change TOMCAT_HOME to the value of $TOMCAT_HOME)
+(Note: Change TOMCAT_HOME to the value of \$TOMCAT_HOME)
Include TOMCAT_HOME/conf/jk/mod_jk.conf-auto
@@ -77,8 +84,8 @@
Include /usr/local/jakarta-tomcat-3.3/conf/jk/mod_jk.conf-auto
-Next copy $TOMCAT_HOME/conf/jk/workers.properties.unix to
-$TOMCAT_HOME/conf/jk/workers.properties
+Next copy TOMCAT_HOME/conf/jk/workers.properties.unix to
+TOMCAT_HOME/conf/jk/workers.properties
Finally, add the apache auto-config setting to Tomcat.
See the release notes for Tomcat 3.3 for information on enabling
@@ -89,7 +96,7 @@
Apache configs: <ApacheConfig />"
-Example ($TOMCAT_HOME/conf/serverl.xml):
+Example (TOMCAT_HOME/conf/serverl.xml):
<AutoWebApp dir="webapps" host="DEFAULT" />
1.1 jakarta-tomcat/src/native/mod_jk/apache1.3/README.hpux
Index: README.hpux
===================================================================
mod_jk README for HP-UX 11
Mike Braden
March 05, 2001
This README explains how to build mod_jk on HP-UX 11 systems.
There are two build scripts for HP-UX:
build-hpux.sh Use if you have the GNU gcc compiler
build-hpux-cc.sh Use if you have the HP ANSI C compiler
The first package is for use with the gcc compiler. It produces 32-bit
code that should run on both PA1.1 and PA2.0 based architectures.
The second script is for use with the HP add-on ANSI C Complier package.
This will not work with the stripped down cc version that ships with
HP-UX. That compiler is just for kernel rebuilds. If you do not have
the HP ANSI C compiler package, then obtain gcc and use the first script.
PREREQUISITES
This script requires that GCC 2.95.2 be installed and in your path.
You should also have the GNU binutils installed. You can obtain
the binary depot files for these at:
http://gatekeep.cs.utah.edu/
Before running the build script, verify that APACHE_HOME and
JAVA_HOME are set correct in the script.
BUILDING MOD_JK
The build script should be run as root as follows:
# sh build-hpux.sh
After the script completes you will need to modify the Tomcat
server.xml file to tell it to generate the auto configuration
for mod_jk.
To do this, edit $TOMCAT_HOME/conf/server.xml and add the following
after <AutoWebApp dir="webapps" host="DEFAULT" />
<ApacheConfig />
The next time you startup Tomcat, it will generate
TOMCAT_HOME/conf/jk/mod_jk.conf-auto with the necessary
commands to use Tomcat through Apache. Tomcat will automatically
add any webapps that it finds in its webapps directory.
See the Tomcat Users Guide and Release Notes for more information.
TROUBLESHOOTING
If you experience problems using the build script, make sure that your
apache installation matches your system. Apache's apxs is a perl
script that is configured when you compile apache for your system.
If you are using a binary install of apache, it will most likely not
be configured correctly for your system.
NOTE: Most apxs errors are due to the use of an Apache binary
installation.
BUILD AND INSTALL APACHE FROM SOURCE. IT'S NOT THAT HARD!
The best solution is to build apache from source as follows:
Download apache from http://httpd.apache.org
Put the source file in /usr/local/src
# cd /usr/local/src
# gzip -dc apache_1.3.17.tar.gz|tar xvf -
# cd apache_1.3.17
# ./configure --prefix=/usr/local/apache --enable-module=most /
--enable-shared=max
# make
# make install
This will build apache and install it into the /usr/local/apache directory.
Note:
In order to build mod_jk for HPUX11 using GCC, support for JNI was removed.
This should not affect Apache 1.3 installations since it is not recommended
to run mod_jk in In-Process mode under Apache 1.3.
If you wish to include support for JNI, you must build mod_jk with the
HP ANSI Compiler using 64-bit mode. The second build script listed at the
top of this document will work.
1.1 jakarta-tomcat/src/native/mod_jk/apache1.3/README.solaris
Index: README.solaris
===================================================================
mod_jk README for Solaris
Mike Braden
March 05, 2001
This README explains how to build mod_jk on Sun Solaris systems.
build-solaris.sh Use with the GNU gcc compiler
This script works with the GNU gcc compiler. This script works on both
SPARC and x86 architecture systems.
PREREQUISITES
This script requires that GCC 2.95.2 be installed and in your path.
You can obtain a gcc binary package from:
http://www.sunfreeware.com/
Before running the build script, verify that APACHE_HOME and
JAVA_HOME are set correct in the script.
BUILDING MOD_JK
The build script should be run as root as follows:
# sh build-solaris.sh
After the script completes you will need to modify the Tomcat
server.xml file to tell it to generate the auto configuration
for mod_jk.
To do this, edit $TOMCAT_HOME/conf/server.xml and add the following
after <AutoWebApp dir="webapps" host="DEFAULT" />
<ApacheConfig />
The next time you startup Tomcat, it will generate
TOMCAT_HOME/conf/jk/mod_jk.conf-auto with the necessary
commands to use Tomcat through Apache. Tomcat will automatically
add any webapps that it finds in its webapps directory.
See the Tomcat Users Guide and Release Notes for more information.
TROUBLESHOOTING
If you experience problems using the build script, make sure that your
apache installation matches your system. Apache's apxs is a perl
script that is configured when you compile apache for your system.
If you are using a binary install of apache, it will most likely not
be configured correctly for your system.
NOTE: Most apxs errors are due to the use of an Apache binary
installation.
BUILD AND INSTALL APACHE FROM SOURCE. IT'S NOT THAT HARD!
The best solution is to build apache from source as follows:
Download apache from http://httpd.apache.org
Put the source file in /usr/local/src
# cd /usr/local/src
# gzip -dc apache_1.3.17.tar.gz|tar xvf -
# cd apache_1.3.17
# ./configure --prefix=/usr/local/apache --enable-module=most /
--enable-shared=max
# make
# make install
This will build apache and install it into the /usr/local/apache directory.
1.1 jakarta-tomcat/src/native/mod_jk/apache1.3/build-hpux-cc.sh
Index: build-hpux-cc.sh
===================================================================
#!/bin/sh
# build-hpux.sh for mod_jk.so
#
# Usage: # sh build-hpux.sh
# for hpux 11 using gcc
# Note: See README-hpux for details. This builds mod_jk without JNI support.
#
# Mike Braden
# Update the following according to your installation
APACHE_HOME=/usr/local/apache
JAVA_HOME=/opt/java1.3
#### End of configuration - do not change below
if [ -f $APACHE_HOME/bin/apxs ] ; then
APXS=$APACHE_HOME/bin/apxs
else
echo Error: Unable to locate apxs.
echo Verify that APACHE_HOME is set correctly in this script.
exit 1
fi
if [ ! -d $JAVA_HOME/include/hp-ux ] ; then
echo Error: Unable to locate Java libraries.
echo Verify that JAVA_HOME is set correctly in this script.
exit 1
fi
JAVA_INCLUDE="-I${JAVA_HOME}/include -I${JAVA_HOME}/include/hp-ux"
INCLUDE="-I../common $JAVA_INCLUDE"
#SRC="../common/jk_ajp12_worker.c ../common/jk_ajp13.c ../common/jk_ajp13_worker.c ../common/jk_connect.c ../common/jk_lb_worker.c ../common/jk_map.c ../common/jk_msg_buff.c ../common/jk_nwmain.c ../common/jk_pool.c ../common/jk_sockbuf.c ../common/jk_uri_worker_map.c ../common/jk_util.c ../common/jk_worker.c mod_jk.c"
SRC="../common/*.c mod_jk.c"
# Run APXS to compile the mod_jk module and its components
echo Building mod_jk
$APXS -o mod_jk.so $INCLUDE -c $SRC
# Check to see if the last command completed
if [ $? -ne 0 ] ; then
echo Error with apxs
exit 1
fi
echo mod_jk build complete.
#
# Clean up
#
rm jk_*.o
rm mod_jk.o
echo Configuring apache...
# Use apxs to add the correct lines to httpd.conf
# Since our auto-config does this in the include
# file (mod_jk-conf-auto), we'll add them as
# commented statements for change later if
# we decide not to use the auto-conf.
#
#$APXS -i -a mod_jk.so
$APXS -i -A mod_jk.so
# Check to see if the last command completed
if [ $? -ne 0 ] ; then
echo Error using apxs to add configuration to httpd.conf
exit 1
fi
# Steps to complete install
cat<<END
Build and configuration of mod_jk is complete.
To finish the installation, edit your apache/conf/httpd.conf file and
add the following line to the end of the file:
(Note: Change TOMCAT_HOME to the value of $TOMCAT_HOME)
Include TOMCAT_HOME/conf/jk/mod_jk.conf-auto
Example (/usr/local/apache/conf/httpd.conf):
Include /usr/local/jakarta-tomcat-3.3/conf/jk/mod_jk.conf-auto
Next copy TOMCAT_HOME/conf/jk/workers.properties.unix to
TOMCAT_HOME/conf/jk/workers.properties
Finally, add the apache auto-config setting to Tomcat.
See the release notes for Tomcat 3.3 for information on enabling
the auto-configure script in section 2, Tomcat Configuration:
"To turn these on, add the following modules after the
<AutoWebApp ... /> module in the server.xml file:
Apache configs: <ApacheConfig />"
Example (TOMCAT_HOME/conf/serverl.xml):
<AutoWebApp dir="webapps" host="DEFAULT" />
<ApacheConfig />
For more information, see the mod_jk-howto located in the docs dir
of TOMCAT. (doc/mod_jk-howto.html)
END
1.1 jakarta-tomcat/src/native/mod_jk/apache1.3/build-hpux.sh
Index: build-hpux.sh
===================================================================
#!/bin/sh
# build-hpux.sh for mod_jk.so
#
# Usage: # sh build-hpux.sh
# for hpux 11 using gcc
# Note: See README-hpux for details. This builds mod_jk without JNI support.
#
# Mike Braden
# Update the following according to your installation
APACHE_HOME=/usr/local/apache
JAVA_HOME=/opt/java1.3
#### End of configuration - do not change below
if [ -f $APACHE_HOME/bin/apxs ] ; then
APXS=$APACHE_HOME/bin/apxs
else
echo Error: Unable to locate apxs.
echo Verify that APACHE_HOME is set correctly in this script.
exit 1
fi
if [ ! -d $JAVA_HOME/include/hp-ux ] ; then
echo Error: Unable to locate Java libraries.
echo Verify that JAVA_HOME is set correctly in this script.
exit 1
fi
JAVA_INCLUDE="-I${JAVA_HOME}/include -I${JAVA_HOME}/include/hp-ux"
INCLUDE="-I../common $JAVA_INCLUDE"
SRC="../common/jk_ajp12_worker.c ../common/jk_ajp13.c ../common/jk_ajp13_worker.c ../common/jk_connect.c ../common/jk_lb_worker.c ../common/jk_map.c ../common/jk_msg_buff.c ../common/jk_nwmain.c ../common/jk_pool.c ../common/jk_sockbuf.c ../common/jk_uri_worker_map.c ../common/jk_util.c ../common/jk_worker.c mod_jk.c"
# Run APXS to compile the mod_jk module and its components
echo Building mod_jk
$APXS -DHPUX11GCC -o mod_jk.so $INCLUDE -c $SRC
# Check to see if the last command completed
if [ $? -ne 0 ] ; then
echo Error with apxs
exit 1
fi
echo mod_jk build complete.
#
# Clean up
#
rm jk_*.o
rm mod_jk.o
echo Configuring apache...
# Use apxs to add the correct lines to httpd.conf
# Since our auto-config does this in the include
# file (mod_jk-conf-auto), we'll add them as
# commented statements for change later if
# we decide not to use the auto-conf.
#
#$APXS -i -a mod_jk.so
$APXS -i -A mod_jk.so
# Check to see if the last command completed
if [ $? -ne 0 ] ; then
echo Error using apxs to add configuration to httpd.conf
exit 1
fi
# Steps to complete install
cat<<END
Build and configuration of mod_jk is complete.
To finish the installation, edit your apache/conf/httpd.conf file and
add the following line to the end of the file:
(Note: Change TOMCAT_HOME to the value of \$TOMCAT_HOME)
Include TOMCAT_HOME/conf/jk/mod_jk.conf-auto
Example (/usr/local/apache/conf/httpd.conf):
Include /usr/local/jakarta-tomcat-3.3/conf/jk/mod_jk.conf-auto
Next copy TOMCAT_HOME/conf/jk/workers.properties.unix to
TOMCAT_HOME/conf/jk/workers.properties
Finally, add the apache auto-config setting to Tomcat.
See the release notes for Tomcat 3.3 for information on enabling
the auto-configure script in section 2, Tomcat Configuration:
"To turn these on, add the following modules after the
<AutoWebApp ... /> module in the server.xml file:
Apache configs: <ApacheConfig />"
Example (TOMCAT_HOME/conf/serverl.xml):
<AutoWebApp dir="webapps" host="DEFAULT" />
<ApacheConfig />
For more information, see the mod_jk-howto located in the docs dir
of TOMCAT. (doc/mod_jk-howto.html)
END
1.3 +4 -2 jakarta-tomcat/src/native/mod_jk/common/jk_global.h
Index: jk_global.h
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/native/mod_jk/common/jk_global.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- jk_global.h 2000/11/10 18:48:50 1.2
+++ jk_global.h 2001/03/12 21:09:26 1.3
@@ -57,7 +57,7 @@
* Description: Global definitions and include files that should exist *
* anywhere *
* Author: Gal Shachor <sh...@il.ibm.com> *
- * Version: $Revision: 1.2 $ *
+ * Version: $Revision: 1.3 $ *
***************************************************************************/
#ifndef JK_GLOBAL_H
@@ -88,7 +88,9 @@
#include <arpa/inet.h>
#include <sys/un.h>
#include <sys/socketvar.h>
- #include <sys/select.h>
+ #ifndef HPUX11
+ #include <sys/select.h>
+ #endif
#endif
#include <sys/time.h>
1.3 +7 -1 jakarta-tomcat/src/native/mod_jk/common/jk_pool.h
Index: jk_pool.h
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/native/mod_jk/common/jk_pool.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- jk_pool.h 2000/11/10 18:48:50 1.2
+++ jk_pool.h 2001/03/12 21:09:28 1.3
@@ -56,7 +56,7 @@
/***************************************************************************
* Description: Memory Pool object header file *
* Author: Gal Shachor <sh...@il.ibm.com> *
- * Version: $Revision: 1.2 $ *
+ * Version: $Revision: 1.3 $ *
***************************************************************************/
#ifndef _JK_POOL_H
#define _JK_POOL_H
@@ -90,6 +90,12 @@
#elif defined(OS2)
typedef long long jk_pool_atom_t;
#elif defined(NETWARE)
+ typedef long long jk_pool_atom_t;
+#elif defined(HPUX11)
+ typedef long long jk_pool_atom_t;
+#elif defined(IRIX)
+ typedef long long jk_pool_atom_t;
+#else
typedef long long jk_pool_atom_t;
#endif
1.2 +6 -2 jakarta-tomcat/src/native/mod_jk/common/jk_worker_list.h
Index: jk_worker_list.h
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/native/mod_jk/common/jk_worker_list.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- jk_worker_list.h 2000/08/26 01:21:47 1.1
+++ jk_worker_list.h 2001/03/12 21:09:30 1.2
@@ -56,7 +56,7 @@
/***************************************************************************
* Description: Worker list *
* Author: Gal Shachor <sh...@il.ibm.com> *
- * Version: $Revision: 1.1 $ *
+ * Version: $Revision: 1.2 $ *
***************************************************************************/
/*
@@ -80,7 +80,9 @@
#include "jk_ajp12_worker.h"
#include "jk_ajp13_worker.h"
/* #include "jk_ajp23_worker.h" */
- #include "jk_jni_worker.h"
+ #ifndef HPUX11GCC
+ #include "jk_jni_worker.h"
+ #endif
#include "jk_lb_worker.h"
struct worker_factory_record {
@@ -110,7 +112,9 @@
* In process JNI based worker. Requires the server to be
* multithreaded and to use native threads.
*/
- { JK_JNI_WORKER_NAME, jni_worker_factory},
+ #ifndef HPUX11GCC
+ { JK_JNI_WORKER_NAME, jni_worker_factory},
+ #endif
/*
* Load balancing worker. Performs round robin with sticky
* session load balancing.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-dev-help@jakarta.apache.org