Liferay Enterprise Tomcat 6 Upgrade for Linux

We recently ran into an issue with our Liferay Enterprise install where the version of Tomcat they had bundled in was falling behind security wise. Currently Tomcat 6.0.29 is available and their bundle is currently holding fast at 6.0.18. When we first set out to install Liferay for use with some internet applications, it was my original intent to start off with a separate installation of Tomcat that we maintain and install the Liferay components on top of that. The consultant that was working with us strongly discouraged that so despite my gut feeling I made the mistake of giving in to the our customer’s demands to get the project underway and installed the bundle. Liferay is pretty well integrated with the various bundles that they support so this is not just a simple drop in and replace upgrade of Tomcat. Word from another department integrating it with JBOSS encountered a similar struggle.

At some point in time, if you began using the bundle, you should have unzipped/untar’d it to a given location, for our servers we used /opt. For simplicity sake, I will just state that liferay is rolled out to a directory called “liferay” beneath /opt. Your directory may be “liferay-portal-5.2.3-ee-sp4” or something to that effect. Beneath /opt/liferay, you should have 4 directories, “deploy”, “ee”, “data” and the tomcat directory encoded by default with the specific version number that was bundled with your install.  For the purposes of this update will refer your current directory of the bundled Tomcat install $TOMCAT-OLD and the one you want to upgrade to $TOMCAT-NEW.

Download the latest version of Tomcat 6 here:

Stop the current running version of Liferay/Tomcat.

Unzip apache-$TOMCAT-NEW to the same directory as your Liferay bundle “/opt/liferay” then rename to the same naming convention (removing “apache-“).

Edit $TOMCAT-NEW/conf/
Search for the line:

Replace the line with this:

Edit $TOMCAT-NEW/conf/server.xml
change each instance of


(three instances, one of which is commented out)

Copy from $TOMCAT-OLD/bin to $TOMCAT-NEW/bin

Delete all contents of $TOMCAT-NEW/webapps

Copy the contents of $TOMCAT-OLD/webapps to $TOMCAT-NEW/webapps

Create directory $TOMCAT-NEW/lib/ext

Copy the contents of $TOMCAT-OLD/lib/ext to $TOMCAT-NEW/lib/ext

Create directory $TOMCAT-NEW/conf/catalina/localhost

Copy the contents of $TOMCAT-OLD/conf/catalina/localhost to $TOMCAT-NEW/conf/catalina/localhost

Review the $TOMCAT-OLD/bin/, you may have custom environmental variables. This is a sample chunk of what gets moved to $TOMCAT-NEW/bin/

and append with

(Be sure to make sure all instances of $TOMCAT-OLD have been replaced with $TOMCAT-NEW).

Test the new install of tomcat by running

If you are starting Tomcat automatically, copy the new over to /etc/init.d/ and the existing symlinks from the proper run levels will be updated as well.

If you have any issues with this process, please feel free to comment below.

2 Replies to “Liferay Enterprise Tomcat 6 Upgrade for Linux”

  1. Hi,
    I have exactly the same problem. We are currently working with a consultant who preconize a Liferay/Tomcat bundle with this old 6.0.18 tomcat version. We already took the decision to install a separate version of tomcat but apparently he maintain that 5.2.3 EE sp4 version of Liferay doesn’t work well with Tomcat 6.0.29. Right now i don’t have the opportunity to try the EE version, just the CE version.
    Have you encoutered any problem with your configuration ?

  2. Helpful post!

    I have a similar problem- I need to keep Eclipse and Liferay in a SVN repository, and when I created the repos, my own paths got coded into the files, so of course Tomcat wouldn’t start on other’s machines after they svn checked-out the repos.

    Theres 100 ways to deal with this of course, but I’d really like to fix it once without documenting anything for the developers.

    Q: do you think I could 1) add an ant script to set catalina_home on the fly
    or 2) change so that it looks up from its location 3 levels and makes that directory catalina_home?



Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.