Skip to content.

Scientific Linux

Sections
Personal tools
You are here: Home » Documentation » How To » Installing tomcat5 on SL5

Installing tomcat5 on SL5

Scientific Linux 5 has both gcj 1.4.2 and jdk 1.5.0. For most programs, this doesn't matter. And the majority of users like having the jdk 1.5.0 plugin for their web browsers.
But Tomcat5 from The Upstream Vendor is compiled to be run on the gcj 1.4.2 version of java. Because of the way that jdk is packaged, jdk 1.5.0 is usually installed and setup so that it is the java in use.
This page is to let people know how to install tomcat5 properly so that it works.

Quick and Dirty

The fastest way is to remove jdk and it's compat rpm (if they are installed) and then install tomcat5
Note: This might remove more than you want. Use with caution.

  1. yum remove jdk java-1.5.0-sun-compat
  2. yum install java-1.4.2-gcj-compat-devel
  3. yum install xml-commons-apis
  4. yum install tomcat5

Quick and More Cautious

If you already have jdk 1.5.0 installed, and don't want it pulling off everything, we can install gcj 1.4.2 and then pull off jdk 1.5.0.
Note: This still might pull off a package or two, but not nearly as many.

  1. yum install java-1.4.2-gcj-compat-devel
  2. yum install xml-commons-apis - Note: this removes jdk 1.5.0
  3. yum remove java-1.5.0-sun-compat
  4. yum install tomcat5

Why are we doing it this way?

java-1.4.2-gcj-compat-devel
Tomcat5 requires ant. ant requires java-devel. Both java-1.4.2-gcj-compat-devel and java-1.5.0-sun-compat provide java-devel. java-1.5.0-sun-compat is technically a newer rpm. So when you try to install ant, and there isn't already a java-devel installed, yum will pick the newest one.
So, by installing java-1.4.2-gcj-compat-devel first, you then have java-devel already installed, and you are able to install ant, without pulling in jdk 1.5.0

xml-commons-apis
Tomcat5 requires xml-commons-apis. jdk 1.5.0 provides xml-commons-apis, but evidently, not in the way that Tomcat5 wants it. We have to install it first so that jdk 1.5.0 doesn't get sucked in.
Also, by calling a specific version of xml-commons-apis, by using the arch, we actually remove jdk. But, you can then also re-install jdk. It's a bit strange that the order it is installed matters, but it does.

I have a tomcat5 plugin that requires jdk 1.5.0. What should I do?

Once tomcat5 is installed and working, you can later put on jdk 1.5.0. But you cannot install the java-1.5.0-sun-compat rpm. You will have to make any configuration by hand.
Note: As of the time of this writting, this has not been tested. But it has been tested that you can install jdk after tomcat5 is installed without messing up tomcat5.

  1. Follow the above directions to get tomcat5 installed and running
  2. yum install jdk - This puts java in /usr/java/jdk-(version)
  3. Do not install java-1.5.0-sun-compat
  4. configure your plugin to use the java in /usr/java/jdk-(version)
Created by dawson
Last modified 2008-03-25 10:56 AM
 

Powered by Plone

This site conforms to the following standards: