tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hgo...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/xdocs/jk buildjk.xml
Date Mon, 02 Sep 2002 10:52:17 GMT
hgomez      2002/09/02 03:52:17

  Added:       jk/xdocs/jk buildjk.xml
  Log:
  This page will cover the build of mod_jk
  Special guest star, iSeries :)
  
  Revision  Changes    Path
  1.1                  jakarta-tomcat-connectors/jk/xdocs/jk/buildjk.xml
  
  Index: buildjk.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1" ?>
  <document>
  <properties>
  <title>Building mod_jk</title>
  <author email="hgomez@apache.org">Henri Gomez</author>
  </properties>
  
  <section name="Building mod_jk for Apache on Unix">
  <p>
  The mod_jk build use the widely used configure system.
  </p>
  <subsection name="Prepare your mod_jk configure from CVS">
  In case you get source from CVS, ie without an existing configure script,
  you should have autoconf for configuration and installation.
  <p>
  To create jakarta-tomcat-connectors's autoconf script, you will need libtool 1.3.3 or higher,

  and autoconf 2.13 or newer.
  </p><p>
  Those tools will not be required if you are just using a package downloaded from apache.org,

  they are only required for developers.
  </p>
  <p>
  To create the configure script just type :
  
  <screen>
  <type>./buildconf.sh</type>
  </screen>
  </p>
  </subsection>
  
  <subsection name="Using configure to build mod_jk">
  <p>Here's how to use configure to prepare mod_jk building, just type: 
  <source>
  ./configure [autoconf arguments] [jakarta-tomcat-connectors arguments]
  </source>
  </p>
  
  <p>
  You could set CFLAGS and LDFLAGS to add some platform specifics:
  </p>
  
  <screen>
  <type>LDFLAGS=-lc ./configure -with-apxs=/home2/local/apache/bin/apxs</type>
  </screen>
  
  <p>
  If you want to build mod_jk for Apache 1.3 and 2.0, you should 
  <ul>
  <li>
  use configure and indicate Apache 1.3 apxs location (--with-apxs)
  </li>
  <li>
  use make
  </li>
  <li>
  copy the mod_jk binary to the apache modules location
  </li>
  <li>
  make clean (to remove all previously compiled modules)
  </li>
  <li>
  use configure and indicate Apache 2.0 apxs location,
  </li>
  <li>
  then make.
  </li>
  </ul>
  
  </p>
  </subsection>
  
  <subsection name="configure arguments">
  <p>
  <table>
    <tr><th>Apache related parameters</th><th></th></tr>
    <tr>
    <td>--with-apxs[=FILE]</td>
    <td>FILE is the location of the apxs tool. Default is finding apxs in PATH.
  It builds a shared Apache module. It detects automaticly the Apache version.
  (2.0 and 1.3)</td>
    </tr>
    <tr><td>--with-apache=DIR</td>
    <td>DIR is the path where apache sources are located.
  The apache sources should have been configured before configuring mod_jk.
  DIR is something like: /home/apache/apache_1.3.19
  It builds a static Apache module.</td>
    </tr>
    <tr><td>--enable-EAPI</td>
    <td>This parameter is needed when using Apache-1.3 and mod_ssl, otherwise you will
get the error message:
  "this module might crash under EAPI!" when loading mod_jk.so in httpd.
  Not needed when --with-apxs has been used</td>
  </tr>
  </table>
  <br/>
  <table>
    <tr><th>JNI related parameters</th><th></th></tr>
    <tr><td>--enable-jni</td>
    <td>Build the JNI worker and so the build process will require 
  some informations about your Java Environment</td>
    </tr>
    <tr><td>--with-java-home=DIR</td>
    <td>DIR is the  patch to the JDK root directory. Something like: /opt/java/jdk12</td>
    </tr>
    <tr><td>--with-os-type=SUBDIR</td><td>SUBDIR is the os-type subdirectory,

    configure should guess it correctly.</td>
    </tr>
    <tr><td>--with-arch-type=SUBDIR</td><td>SUBDIR is the arch subdirectory,

    configure should guess it correctly.</td>
    </tr>
    <tr><td>--with-java-platform=VAL</td><td>VAL is the Java platform
1 is 1.1.x and 2 is for 1.2 anf higher, 
    configure should guess it correctly.</td>
    </tr>
  </table>
  </p>
  </subsection>
  
  <subsection name="Examples of configure use">
  
  <screen>
  <note>Apache 1.3 and 2.0 build</note>
  <type>./configure --with-apxs=/usr/sbin/apxs</type><br/>
  <type>make</type><br/>
  <type>cp ./apache-1.3/mod_jk.so /usr/lib/apache</type><br/>
  <type>make clean</type><br/>
  <type>./configure --with-apxs=/usr/sbin/apxs2</type><br/>
  <type>make</type><br/>
  <type>cp ./apache-2.0/mod_jk.so /usr/lib/apache2</type><br/>
  </screen>
  
  <screen>
  <note>Apache 2.0 build with JNI support</note>
  <type>./configure --with-apxs=/opt/apache2/bin/apxs \</type>
  <typenext>--with-java-home=${JAVA_HOME} --with-java-platform=2 \</typenext>
  <typenext>--enable-jni</typenext><br/>
  </screen>
  
  <screen>
  <note>Apache 1.3 build without JNI support</note>
  <type>./configure --with-apxs=/usr/sbin/apxs</type><br/>
  </screen>
  
  </subsection>
  
  </section>
  
  <section name="Building mod_jk for Apache on Windows NT/2K/XP">
  <p>
  The module was developed using Visual C++ version 6.0, so having this environment is a prerequisite

  if you want to perform a custom build.
  </p>
  <p>
  The steps that you need to take are:
  </p>
  <ul>
  <li>
  Change directory to the apache 1.3 or apache 2.0 source directory depending on your version
of Apache.
  </li>
  <li>
  Set an APACHE1_HOME environment variable which points to where your Apache is installed.
  </li>
  <li>
  Execute the following command:
  </li>
  </ul>
  <screendos>
  <typedos>MSDEV mod_jk.dsp /MAKE ALL</typedos>
  </screendos>
  
  If msdev is not in your path, enter the full path to msdev.exe. Also, ApacheCore.lib is
expected to exist in the APACHE1_HOME\src\CoreD and APACHE1_HOME\src\CoreR directories before
linking will succeed. You will need to build enough of the Apache source to create these libraries.
  <ul>
  <li>
  Copy mod_jk.dll to Apache's modules directory.
  </li>
  </ul>
  <p>
  This will build both release and debug versions of the redirector plug-in (mod_jk).
  An alternative will be to open mod_jk.dsp in msdev and build it using the build menu.
  </p>
  </section>
  
  <section name="Building mod_jk for Apache on iSeries/OS400">
  <p>
  Since OS400 V4R5, iSeries (AS/400) used Apache 2.0 as their primary web server, replacing
the old IBM webserver.
  It's now possible to build mod_jk on iSeries thanks to the help of IBM Rochester Labs who
provided informations and patches
  to adapt mod_jk to their Operating System.
  </p>
  <p>
  You should have at least Apache 2.0.39 which is provided in recent PTFs, a C Compiler and
IFS.
  Since there's still no configure stuff on iSeries, you'll have to use the good command line
or use a CL with is present 
  in mod_jk source.
  </p>
  <ul>
  <li>
  Get the latest mod_jk source and untar it on a Windows or Unix boxes
  </li>
  <li>
  Create a directory in IFS, ie /home/apache
  </li>
  <li>
  Send the whole jk source directory to iSeries directory via FTP.
  </li>
  <li>
  Then go to iSeries command line :
  </li>
  </ul>
  <screen5250>
  <note5250>Create mod_jk library</note5250>
  <type5250>CRTLIB MOD_JK TEXT(‘Apache mod_jk tomcat connector module’)</type5250>
  <note5250>Create service program source file</note5250>
  <type5250>CRTSRCPF MOD_JK/QSRVSRC TEXT(‘Service program source file’)</type5250>
  <note5250>Create the CL build program source file</note5250>
  <type5250>CRTSRCPF FILE(MOD_JK/QCLSRC) TEXT(‘Build program source file’)</type5250>
  <note5250>Edit the service program source file</note5250>
  <type5250>STRSEU MOD_JK/QSRVSRC MOD_GZIP</type5250>
  </screen5250>
  <p>
  In the edited file, add :
  <source>
  STRPGMEXP PGMLVL(*CURRENT)
  EXPORT SYMBOL("jk_module")
  ENDPGMEXP
  </source>
  </p>
  <p>
  You could start to build all the modules of mod_jk :
  </p>
  <screen5250>
  <note5250>Copy the CL build program source from IFS</note5250>
  <type5250>CPYFRMSTMF FROMSTMF('/home/apache/jk/native/apache-2.0/bldjk.qcsrc') +</type5250>
  <type5250next>TOMBR('/QSYS.LIB/MOD_JK.LIB/QCLSRC.FILE/BLDJK.MBR') MBROPT(*REPLACE)</type5250next>
  <note5250>Build the CL build program</note5250>
  <type5250>CRTCLPGM PGM(MOD_JK/BLDJK) SRCFILE(MOD_JK/QCLSRC) TEXT('Apache mod_jk build
program')</type5250><br/>
  <note5250>Launch the build</note5250>
  <type5250>CALL MOD_JK/BLDJK</type5250><br/>
  <note5250>If the build if successfull, copy the new mod_jk module</note5250>
  <type5250>CPY OBJ(MOD_JK/MOD_JK) TODIR(QHTTPSVR) TOOBJ(QZTCJK)</type5250><br/>
  </screen5250>
  <p>
  Next, you should restart your Apache 2.0 server and enjoy this piece of OpenSource on iSeries.
  </p>
  </section>
  
  <section name="NES/iPlanet">
  <p>
  Informations and FAQ about mod_jk and NES/iPlanet Web Servers. 
  </p>
  </section>
  
  </document>
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message