Tomcat Installation on RHE 3

SECTION 1
Download
-JDK

 

SECTION 2
-Download Tomcat
 

SECTION 3
-Configure for Oracle 9i Database Access



1. Download the Packages:

The following packages have to be downloaded from the appropriate sites:

Java Development Kit(JDK) : From http://java.sun.com/j2se/1.5.0/download.jsp  download the Linux self-extracting file.
# cp /home/www/src/jdk-1_5_0_05-linux-i586.bin  /usr/java
# cd /usr/java
# ./jdk-1_5_0_05-linux-i586.bin
# <Accept the agreement>

This will install JDK in /usr/java/jdk1.5.0_05
Create a link in /usr using the command:
# ln -s /usr/java/jdk1.5.0_05 /usr/jdk1.5.0_05
In .bash_profile add the line :
JAVA_HOME="/usr/jdk1.5.0_05"; export JAVA_HOME

 

2. Tomcat : From http://jakarta.apache.org/site/downloads/downloads_tomcat.html  download Jakarta-Tomcat.  I had downloaded jakarta-tomcat-5.0.28.tar.gz.


# cp /home/www/src/jakarta-tomcat-5.0.28.tar.gz /usr/local/src
# gunzip jakarta-tomcat-5.0.28.tar.gz
# tar -xvf jakarta-tomcat-5.0.28.tar.gz

Set the environment variable : CATALINA_HOME as the BASE DIRECTORY of Tomcat as follows in the .bash_profile:
CATALINA_HOME=/usr/local/src/jakarta-tomcat-5.0.28; export CATALINA_HOME

# $CATALINA_HOME/bin/startup.sh

After running this command, you should be able to view the Web Site from the URL: http://localhost:8080/





 

 



3. Oracle Database Access :

After renaming classes12.zip file to classes12.jar for Tomcat, copy it into $CATALINA_HOME/common/lib. You may also have to remove the javax.sql.* classes from this file depending upon the version of Tomcat and JDK you are using.
Details of the file and associated drivers are available at http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm
The classes12.jar is available for download from :
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc817.html
You need a OTN Login to access this page.



4. JSP Example :
Go to the directory : /usr/local/src/jakarta-tomcat-5.0.28/webapps/jsp-examples
In this directory, you can place your JSP files. Examples of JSP Files are available in this directory. Do no ttouch any of these files. Create a folder and create your own JSP files there.