www.devco.net by r.i.pienaar

8Feb/069

RedHat Linux and Java

I am in the process of building a automated RedHat Linux installer which requires me to configure the following on a RedHat Enterprise Machine:

RedHat has stopped providing any kind of Java binaries with their base OS, you have to buy a copy of the RedHat Application Server for $999.
As is often the case in this kind of situation there are other options that does not cost money, the group over at JPackage.Org does a great job of packaging all things Java in generic RPMs that will work on most RPM based distributions.
There are limitations though, jpackage is not allowed to distribute binaries of the non-free code such as the Sun JVM itself but they do provide source RPMs that lets you build this on your own after downloading the source from the Sun website.
I have written up a Wiki entry that details from start to end the process in getting the above working on CentOS. CentOS is of course a binary distribution of RedHat Enterprise Linux, they take the opensource SRPMs as provided by RedHat and removes all RedHat branding from the OS giving you a functional equivalent to RedHat Enterprise without the price tag. I use it on my development systems and so for the moment this guide only applies directly to CentOS though the differences are small.
This may look daunting at first but it really is not, once you've built the binary RPMs of the non-free code it is a breeze to install many machines with these RPMs using only a few commands and 1 config file. So you'll soon reap the benefits especially if you are tasked with configuring a cluster of webservers that should all be on the same patch levels.
You can find the full guide here: Tomcat 5 on RedHat Enterprise Linux using JPackage.org Packages.

About R.I. Pienaar

Systems Administrator, Consultant, Linux Guy, Automator, Ruby Coder
Comments (9) Trackbacks (0)
  1. Is there anything preventing you from using CentOS in production rather than RedHat Enterprise Linux?
    I administer a couple of RedHat 7.3 web portals and am in the process of setting up a migration path to something like RH EL. I was thinking of using CentOS (heard a lot of good things about it), but management is pushing for Fedora (their new buzz word). I suppose Fedora will do but i’d feel more comfortable running something as close to RH EL as possible, ala CentOS, since they’re not willing to pay for RH EL. Any recommendations?

  2. I think this demonstrates the problem with letting management make decisions they aren’t qualified to make :)
    Fedora while having stable and mature versions are the RedHat play ground, its where the latest and greatest things that will be in RHEL are tested and sorted out.
    RHEL on the other hand is the stable and reliable one, Red Hat commits to supporting each release for many years and you can trust that when they say so they will actually do it. Because thats their business, their reaon to exist etc. You can buy support. You get indemnity against all kinds of things and in general if you’re a big company with investors knocking at the door they get warm fuzzies because you are using a “real” OS, it’s irrelevant if thats a justified claim or not or if Red Hat is more “real” than Fedora, thats just what they believe.
    So what about CentOS? Well CentOS is mostly like RHEL, except without the indemnity, commercial support, certified hardware support etc. You can use it, technically between us geeks its the same thing as RHEL. But where it matters – if you buy IBM kit and you phone up IBM saying you use CentOS and not RHEL you’ll be running into support troubles right there, ditto for many software vendors etc.
    So if none of the above matter much for you and all you want is a nice solid distro to run your prod stuff on then go for CentOS, their releases are supported as long as RHEL ones are since they are built from the same sources. The only little niggle is that it sometimes take some time for patches to reach CentOS from RHEL because volunteers have to rebuild them and rip out the branding etc.

  3. Thanks for the explanation. Hardware / Vendor support hasn’t really been an issue up until now.
    We’re only reliant on HP to provide us with the hardware, but have never requested actual support from them otherwise. It’s a pitty you can’t use FreeBSD solely in your production environment (suppose there is a valid reason for it — I noticed it’s your preferred server OS) neither can I run Debian (without getting into a CentOS vs Debian war :) , I guess we have to keep the suites feeling warm and fuzzy.

  4. Man, that is some serious geekiness! Too cool ;-)

  5. I’ve just started using your wonderful guide to install Tomcat and start playing with Java Server Pages. However, I seem to have run into small problem. I was able to build the RPMS for Java-1.4.2 successfully but was unable to complete the build for the jta due to a missing dependency, java-devel. Do I need to build this RPM as well, and install it?
    Also, in the guide you mention adding all the Java & jta RPMS to the local yum repository. Exactly how is this accomplished?
    Thanks again for providing a good resource!

  6. Zoom:
    After creating the RPMs for Java, you need to install them:
    cd /usr/src/redhat/RPMS/i586
    rpm -ivh java-1.5.0-sun-1.5.0.06-1jpp.i586.rpm java-1.5.0-sun-devel-1.5.0.06-1jpp.i586.rpm

  7. Thanks for this awesome reference! It really helped with setting up everything necessary to support tomcat5 and Apache2. I used java 1.5.0, but the steps you posted were all I needed to get started.
    Is the example for the workers.properties correct? The Tomcat Documentation link on workers makes me think it is a typo, but nobody here has asked about it in 9 months. I’m currently using the workers.properties.sample that ships with the mod_jk-ap20 RPM.

  8. I’ve corrected the workers.properties sample in the doc, thanks :)

  9. Thx for your guidline. Great work.
    Maybe some reader need to patch their java.spec by hand like this:
    http://lists.centos.org/pipermail/centos/2006-February/061142.html


Leave a comment


Trackbacks are disabled.