In order to get the basic Tomcat 5 going you'll need to get at least the Java 1.4.2 Environment including JTA built from source.

Generic guides for building the non free parts of JPackage are provided on their site, I'll show a quick run through on what I did here using CentOS though.

First you need to retrieve and install the Source RPMs for java-1.4.2-sun-1.4.2.10-1jpp.nosrc.rpm and jta-1.0.1-0.b.4jpp.nosrc.rpm

rpm -ivh http://mirrors.dotsrc.org/jpackage/1.6/generic/non-free/SRPMS/java-1.4.2-sun-1.4.2.10-1jpp.nosrc.rpm
rpm -ivh http://mirrors.dotsrc.org/jpackage/1.6/generic/non-free/SRPMS/jta-1.0.1-0.b.4jpp.nosrc.rpm

Visit java.sun.com and download the "J2SE SDK", there are many versions and types of files available, you want the one called j2sdk-1_4_2_10-linux-i586.bin put it in /usr/src/redhat/SOURCES

Building the binary RPMs is very easy if you got the above right:

cd /usr/src/redhat/SPECS ; rpmbuild -ba java-1.4.2-sun.spec

If all goes well the last few lines you'll see from the above command should be:

Wrote: /usr/src/redhat/SRPMS/java-1.4.2-sun-1.4.2.10-1jpp.nosrc.rpm
Wrote: /usr/src/redhat/RPMS/i586/java-1.4.2-sun-1.4.2.10-1jpp.i586.rpm
Wrote: /usr/src/redhat/RPMS/i586/java-1.4.2-sun-devel-1.4.2.10-1jpp.i586.rpm
Wrote: /usr/src/redhat/RPMS/i586/java-1.4.2-sun-src-1.4.2.10-1jpp.i586.rpm
Wrote: /usr/src/redhat/RPMS/i586/java-1.4.2-sun-demo-1.4.2.10-1jpp.i586.rpm
Wrote: /usr/src/redhat/RPMS/i586/java-1.4.2-sun-plugin-1.4.2.10-1jpp.i586.rpm
Wrote: /usr/src/redhat/RPMS/i586/java-1.4.2-sun-fonts-1.4.2.10-1jpp.i586.rpm
Wrote: /usr/src/redhat/RPMS/i586/java-1.4.2-sun-alsa-1.4.2.10-1jpp.i586.rpm
Wrote: /usr/src/redhat/RPMS/i586/java-1.4.2-sun-jdbc-1.4.2.10-1jpp.i586.rpm

Download the JTA source and docs from java.sun.com and place these in the /usr/src/redhat/SOURCES directory then build the binary package:

cd /usr/src/redhat/SPECS ; rpmbuild -ba jta.spec

If all goes well the last few lines you'll see from the above command should be:

Wrote: /usr/src/redhat/SRPMS/jta-1.0.1-0.b.4jpp.nosrc.rpm
Wrote: /usr/src/redhat/RPMS/noarch/jta-1.0.1-0.b.4jpp.noarch.rpm
Wrote: /usr/src/redhat/RPMS/noarch/jta-javadoc-1.0.1-0.b.4jpp.noarch.rpm

All that is left now is for you to add the RPM files listed above - for JTA and the Java 1.4.2 - local yum repository.

RedHat/Java/BuildNonFree (last edited 2006-02-08 15:11:22 by azrael)