IDependOn-Set: 1
IDependOn-Set: 13
IDependOn-Set: 15
IDependOn-Set: 2
IDependOn-Set: 48
IDependOn-Set: 65
IDependOn-Set: 66
LastModifiedSecs: 922991291
Parent: 15
SequenceNumber: 4
Title: Paul Russo's Installation Instructions on Linux RedHat 5.2
Part: 0
Author-Set: jon@working-dogs.com
HideAttributions: 1
LastModifiedSecs: 922060380
Type: html
Lines: 94
Steps I took to get Java servlets to run under the Apache web server<BR>
Linux RedHat 5.2
<P>
Download the following distributions into /usr/local/src<BR>
<TABLE>
 <TD WIDTH=200><U><B><BIG>Distributions</BIG></U></TD>
 <TD WIDTH=200><U><B><BIG>Location</BIG></U></TD>
<TR>
<TD>Apache-JServ-1.0b3</TD>
<TD><A HREF="http://java.apache.org">http://java.apache.org</A> (Servlet to run on Apache)</TD>
<TR>
<TD>JSDK2.0</TD>
<TD><A HREF= "http://java.sun.com">http://java.sun.com</A> (Java Server Deveolpment Kit)</TD>
<TR>
<TD>Apache_1.3.4</TD>
<TD><A HREF="http://www.apache.org">http://www.apache.org</A> (Latest Appache web server)</TD>
<TR>
<TD>JDK117_v1a or JDK1.2 (pre-release)</TD>
<TD><A HREF="http://www.blackdown.org">http://www.blackdown.org</A> (Linux port of JDK)</TD>
</TR>
</TABLE>
<P>
gunzip and untar the .gz files from /usr/local/src 
using: tar xvzf 'name'.gz
<P>
We need to set some environmental variables<br>
Since I use bash logon shell, I set them in .bash_profile
<P>
Paths to set in .bash_profile<br>
JAVA_HOME=/usr/local/src/jdk1.2<br>
JSDK_HOME=/usr/local/src/JSDK2.0</br>
<P>
For JDK < 1.2 <BR>
<B>CLASSPATH=$JAVA_HOME/lib/classes.zip:$JSDK_HOME/lib/jsdk.jar</B></br>
For JDK = 1.2<br>
<B>CLASSPATH=$JSDK_HOME/lib/jsdk.jar</B></br>

PATH=$JAVA_HOME/bin:$JSDK_HOME/bin:$PATH</br>
<B>Append path last because jar, java and javac also exist in /usr/bin!!</B>
<P>
export PATH JAVA_HOME CLASSPATH
<P>

Logout then logon to have the paths set<br>
Test the path settings:<br>
<B># java -version<br>
# servletrunner</B>
<P>
If it looks ok then we can configure jserv.<br>
<B># cd /usr/local/src/Apache-JServ-1.0b3<br>
# ./configure --prefix=/usr/local/etc/jserv;make;make install</B>
<P>
This should complete successfully if the paths are<br>
properly set.<br>
<P>
Created directories <br>
<B>/usr/local/etc/jserv<br>
/usr/local/etc/jserv/doc<br>
/usr/local/etc/jserv/lib</B><br>
and the file /usr/local/etc/jserv/lib/Apache-JServ.jar
<P>
Now we need to compile Apache with servlet support.
<OL>
<LI>Copy the jserv modules to the Apache source extra modules directory<BR>
<B># cp /usr/local/src/Apache-JServ-1.0b3/src/c/*.* /usr/local/src/apache_1.3.4/src/modules/extra</B>
<LI>Compile Apache using the following options</B><BR>
<B># cd /usr/local/src/apache_1.3.4</B></B><BR>
<B># ./configure --prefix=/home/apache --add-module=src/modules/extra/mod_jserv.c --enable-shared=jserv --enable-module=jserv</B><BR>
<B># make;make install</B>
</OL>
<HR>
<h1>Changes to configuration files</h1>
Append /usr/local/src/Apache-JServ-1.0b3/conf/http.conf.in to APACHE_DIR/conf/http.conf</BR>
<h3>Modify APACHE_DIR/conf/http.conf</h3>
  <OL>
    <LI>Modify <B>ApJServProperties</B> to point to the jserv.properties file</LI>
    <LI>Modify <B>ApJServMount</B> to point to a zone when requesting http://host/servlet/myServlet<BR><B>ApJServMount /servlet /zone1</B></LI>
   </OL>
<h3>Modify jserv.properties file</h3>
<OL>
    <LI>zones=zone1</LI>
    <LI>zone1.properties=PATH TO zone1.properties</LI>
    <LI>log.file = a place for the log file with a 777 mode (JDK1.2)
</OL>
<h3>Modify zone1.properties</h3>
  <OL>
    <LI>repositories=PATH TO A SERVLET</LI>
    <LI>repositories=PATH TO ANOTHER SERVLET</LI>
  </OL>
</UL>
<LI>Start apache /home/apache/bin/apachectl start</LI> 
<LI>Include <B>apache /home/apache/bin/apachectl start</B> in /etc/rc.d/rc.local</LI>
</UL>
<A HREF="mailto:paul@jchart.com">Email</A> 
EndPart: 0
Part: 1
Author-Set: anonymous
HideAttributions: 1
LastModifiedSecs: 922991280
Type: 
Lines: 4
Subcategories:


Answers in this category:
EndPart: 1
