...
As an alternative to the instructions below it is possible to use the Sun JVM/JDK (1.5.0) which is supplied on the RHEL5 Supplementary Disc, and the corresponding supplementary updates repository. This can be used with the stock RHEL5 version of tomcat (5.5.23). The advantage of using this combination the packages which are supplied by Red Hat is that you will be provided with security updates for these package packages by Redhat Red Hat - otherwise you will have to manually keep track of any security updates and manually download reinstall monitor the relevant upstream mailing lists for security announcements, and then download and reinstall security fixes as necessary. Once you have the RHEL5 supplementary repository configured, you can:
Code Block |
---|
# yumyum install java-1.5.0-sun java-1.5.0-sun-devel # /etc/init.d/tomcat5 restart |
The newly installed JVM and JDK will become the default via the Linux "alternatives" mechanism. To verify the Java version being used, drop the following code snippet into /var/lib/tomcat5/webapps/test/index.jsp
Code Block |
---|
<html>
<head><title>Java system info</title></head>
<body><p>Java Version <%= java.lang.System.getProperty("java.version") %></p>
<p>Vendor <%= java.lang.System.getProperty("java.vendor") %></p>
<p>Java home <%= java.lang.System.getProperty("java.home") %></p>
<p>Java VM Version <%= java.lang.System.getProperty("java.vm.version") %></p>
<p>Server OS name <%= java.lang.System.getProperty("os.name") %></p></body></html>
|
and check the output with:
Code Block |
---|
lynx http://localhost:8080/test
|
NOTE: This walkthrough uses Apache HTTP server to front-end Apache Tomcat 5.5.x for SSL by forwarding requests through the Apache mod_jk module.
...
NOTE: You can avoid step 2, 4, 5 and 6 and keep your Tomcat package in sync with the Redhat yum repo. However you'll end up with a somewhat mixed environment that may cause some issues. See http://www.ja-sig.org/wiki/display/CASUM/Switching+to+a+Sun+JVM+in+RHEL.
Step 1: Download and install Apache HTTP server
...