By Sean Reifschneider Date November 2, 2005
|
NOTE: Thanks to Ben Chapman for updating the previous version of the instructions. This document mirrored from http://www.law.emory.edu/~bchapman/tomcat5.html (no longer accessible) with modifications to the style, formatting and attribution. |
These instructions help you install Sun's Java 1.5.0.11-1 JDK on Centos 4.4, so that you can run tomcat 5.
First, you'll need some base packages that you may not have already installed.
yum install rpm-build gcc-java |
Visit the jpackage.org site and navigate to their yum page (https://jpackage.org/yum.php)
Copy this file
( https://jpackage.org/jpackage.repo ) into /etc/yum.repos.d/
The repo file does not have the jpackage repositories enabled by
default. You'll need to set enabled=1 for
each repo that you need.
yum update |
Get some SRPMs for building the non-free packages. I like installing these to /usr/local/src on Linux systems. If you prefer another directory (/tmp works well) use it instead.
cd /usr/local/src wget ftp://jpackage.hmdc.harvard.edu/mirrors/JPackage/1.7/generic/non-free/SRPMS/java-1.5.0-sun-1.5.0.11-1jpp.nosrc.rpm wget ftp://jpackage.hmdc.harvard.edu/mirrors/JPackage/1.6/generic/non-free/SRPMS/jta-1.0.1-0.b.4jpp.nosrc.rpm |
Download some required files to /usr/src/redhat/SOURCES:
cd /usr/src/redhat/SOURCES |
Download jta-1_0_1B-classes.zip here after agreeing to the license. Look for the link to "Class Files 1.0.1B"
Download jdk-1_5_0_11-linux-i586.bin, again after agreeing to a license. The Sun page is somewhat confusing to navigate. You can start here and navigate through the series of clicks until you get to the following screen.
This page was last updated on 2006-03-07. You might have to poke around on the to find the right files if Sun has changed those pages too much.
Build and install the non-free packages.
rpmbuild --rebuild /usr/local/src/java-1.5.0-sun-1.5.0.11-1jpp.nosrc.rpm rpm -ivh /usr/src/redhat/RPMS/i586/java-1.5.0-sun-1.5.0-11-1jpp.i586.rpm rpm -ivh /usr/src/redhat/RPMS/i586/java-1.5.0-sun-devel-1.5.0.11-1jpp.i586.rpm rpmbuild --rebuild --without javadoc /usr/local/src/jta-1.0.1-0.b.4jpp.nosrc.rpm rpm -ivh /usr/src/redhat/RPMS/noarch/jta-1.0.1-0.b.4jpp.noarch.rpm |
And finally, install the free packages (do not panic - this will cause lots of packages to be installed):
yum install tomcat5 tomcat5-webapps tomcat5-admin-webapps |