There are quite a few ways to go about this but one of the better (though not necessarily the easiest) is to use JPackage. On their website, it says that the JPackage Project has two primary goals:
- To provide a coherent set of Java software packages for Linux, satisfying all quality requirements of other applications.
- To establish an efficient and robust policy for Java software installation.
Now that is exactly what I’m looking for.
SETUP JPACKAGE
cd ~
wget http://jpackage.org/jpackage.asc
wget http://jpackage.org/jpackage.repo
su
rpm –import jpackage.asc
mv jpackage.repo /etc/yum.repos.d/
exit
SETUP RPM BUILDING
mkdir ~/rpms
cd ~/rpms
mkdir {tmp,build,rpms,sources,specs,srpms}
Put the following into .rpmmacros in your home directory:
%_topdir %(echo /home/jay/rpms)
%_tmppath %{_topdir}/tmp
%_builddir %{_topdir}/build
%_rpmdir %{_topdir}/rpms
%_sourcedir %{_topdir}/sources
%_specdir %{_topdir}/specs
%_srcrpmdir %{_topdir}/srpms
BUILD THE RPMS FOR REQUIRED NON-FREE PACKAGES JDK AND JTA
Get the JDK files from Sun: jdk-1_5_0_03-linux-i586.bin (not jdk-1_5_0_03-linux-i586-rpm.bin!)
cp jdk-1_5_0_03-linux-i586.bin ~/rpms/sources
Get the JDK source rpm from jpackage
rpm -Uvh java-1.5.0-sun-1.5.0.03-1jpp.nosrc.rpm
cd ~/rpms/specs
rpmbuild -ba java-1.5.0-sun.spec
Get the JTA files from Sun: jta-1_0_1B-classes.zip and jta-1_0_1B-doc.zip
cp jta-1_0_1B-classes.zip jta-1_0_1B-doc.zip ~/rpms/sources
Get the JTA source rpm from jpackage
rpm -Uvh jta-1.0.1-0.b.4jpp.nosrc.rpm
cd ~/rpms/specs
rpmbuild -ba jta.spec
INSTALL SOME DEPENDENCIES FOR JDK*
su
yum install xorg-x11-deprecated-libs
yum install xorg-x11-deprecated-libs-devel
yum install unixODBC
yum install unixODBC-devel
exit
*Theoretically not necessary if you use yum to install JDK
INSTALL JDK AND JTA
cd ~/rpms/rpms/i586
su
rpm -Uvh *
cd ~/rpms/rpms/noarch
rpm -Uvh *
exit
AND FINALLY INSTALL TOMCAT5
su
yum install tomcat5
yum install tomcat5-admin-webapps
yum install tomcat5-webapps
exit
Fedora Core 4 came out today though. Maybe all this hocus pocus is no longer needed.