Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Most people will find that installing CAS 3.0.x on RHEL 5 isn't initially as straightforward as they hoped.  This is largely in part due to Redhat not officially supporting either the Sun Java Development Kit (JDK).  By default, Redhat has bundled RHEL 5 with the GNU Compiler for Java (GCJ) from JPackage, which is equivalent to J2SE 1.4.2 as of July 2007.  This can cause code compiled by newer versions of Sun JDK to be incompatible with GCJ.  However, it is not only possible but fairly easy to get CAS 3.0.x deployed on RHEL 5.

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 the packages which are supplied by Red Hat is that you will be provided with security updates for these packages by Red Hat - otherwise you will have to manually 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

#  yum 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

The following software packages from yum should be installed for Apache HTTP:

  • httpd
  • mod_ssl

The following software packages are optional but necessary if you want to install the Apache mod_jk module to forward Apache HTTP requests to Apache Tomcat.  If not, then you can use the Apache mod_proxy_ajp module installed by default with Apache HTTP:

  • httpd-devel
  • apr
  • apr-devel
  • apr-util
  • apr-util-devel

Once all of the packages have been installed, check the /usr/lib/httpd/modules directory to make sure that the mod_proxy_ajp module was installed.  The mod_proxy_ajp module is needed to front-end Apache Tomcat with Apache HTTP, which we will see later.

The only immediate Apache HTTP configuration change that needs to be made now is to configure the server's host name.  This can be done by editing the /etc/httpd/conf/httpd.conf file, uncommenting the line with ServerName, and setting it appropriately for the server.

Step 2: Remove pre-installed version of Apache Tomcat 5.5.x

...

Step 6: Download and install Apache Ant


Step 7:

...

Forward Apache HTTP requests to Apache Tomcat


Step 8: Download and deploy CAS server 3.0.x 

...