SCIENTIFIC-LINUX-USERS Archives

March 2008

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Troy Dawson <[log in to unmask]>
Reply To:
Troy Dawson <[log in to unmask]>
Date:
Tue, 25 Mar 2008 11:01:56 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (83 lines)
Hi,
Since this comes up occasionally, I figured I'd better write up a web page.

https://www.scientificlinux.org/documentation/howto/tomcat5-sl5

I hope this helps.  Comments are welcome.
And so people who might want this in the e-mail, here is a cut and paste.

-------------

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)


Troy
-- 
__________________________________________________
Troy Dawson  [log in to unmask]  (630)840-6468
Fermilab  ComputingDivision/LCSI/CSI DSS Group
__________________________________________________

ATOM RSS1 RSS2