Installation Documentation For Upgrading Tomcat - getrailo/railo GitHub Wiki

Documentation Home

Table of Contents

Upgrading Tomcat

This documentation is intended to cover the process of upgrading Tomcat "by hand". As of Railo 3.3, the Railo Installers contain an automatic update process that will trigger if you run the installer and attempt to install to a directory already containing a copy of Railo. The automatic update process is recommended unless you experience problems with it; in which case these instructions will show you how to perform a manual update so you can obtain access to the latest security and performance enhancements even without the automatic upgrade process.

If you experience problems, please remember to contact Railo and let us know! That way we can investigate and fix any issues you may encounter.

IMPORTANT: Note that the following documentation assumes that you're running on Ubuntu, as that seems to be the most common distribution that we get asked about. If you're running a different distribution, such as CentOS, Fedora, RHEL, Debian, etc, then you will probably need to adjust the commands shown here to your environment. For example, CentOS/RHEL will not need "sudo" in front of it under normal circumstances.

Upgrading the Core Libraries

The core libraries are the easiest part of Tomcat to update, and generally this is all that's needed in order to take advantage of the latest bug fixes, new features, and security updates. Occasionally, more then just the libraries will need to be updated, but this varies by update, so watch the release notes to see if anything outside the core libraries was updated (like the web applications, windows service controls, etc).

In order to update the Tomcat libraries, simply take the following steps:

STEP 1 - Shut Down Railo/Tomcat

It could be problematic to copy over libraries while the server that utilizes them is still running, so we're just going to stop the Railo/Tomcat server before we proceed with the Tomcat Upgrade. Stop the Railo/Tomcat service with the following command:

# sudo /opt/railo/railo_ctl stop

STEP 2 - Download and Unzip Tomcat

Go to the Tomcat download page: Tomcat 6 Download Page, and download the tomcat core zip file for the latest release. As of this writing, the latest production release of Tomcat is 6.0.32, but releases happen a lot, so chances are the latest version that you will see will be newer.

# wget http://www.poolsaboveground.com/apache/tomcat/tomcat-6/v6.0.32/bin/apache-tomcat-6.0.32.tar.gz

Now unzip it:

# tar -xzf apache-tomcat-6.0.32.tar.gz

Tomcat Core Tar.GZ Download

Once you download and unzip it, you should see a "lib" directory in the unzipped files:

Tomcat Libs

STEP 3 - Create a Backup

By default, Railo is installed to /opt/railo/, which means that the tomcat libraries are going to be located in /opt/railo/tomcat/lib. We need to copy the files from the core lib directory that we just downloaded, to the lib directory inside the installed tomcat. Before we do that, it would be wise to copy the /opt/railo/tomcat/lib directory to use as a backup in case anything goes wrong. You can do that by running the following command from the shell:

sudo mv /opt/railo/tomcat/lib/ /opt/railo/tomcat/lib-bakup/

STEP 4 - Copy Libraries Over

Now copy the library files over using the following command:

sudo cp -R ./apache-tomcat-6.0.32/lib/ /opt/railo/tomcat/lib/

STEP 5 - Start Tomcat and Check Version

Start up the Tomcat/Railo:
sudo /opt/railo/railo_ctl start

Once it's started, log in to your tomcat administrator - usually at http://localhost:8888/manager/html/. You will be prompted with your Tomcat username and password. You set up your Tomcat username and password when you installed Railo via the installer. Once logged in, your Tomcat version number will be located at the bottom-left of the screen.

Have fun and stay secure!

Applying other Tomcat Updates

Occasionally, the Tomcat development team will release updates for features beyond the Tomcat core. The most notable of which are the included applications (like the Tomcat Administrator, Host Manager, etc). To update the included applications, simply copy them over as well. They will be located in the /opt/railo/tomcat/webapps/ROOT/ directory, in both the install and the download.

Documentation Home

⚠️ **GitHub.com Fallback** ⚠️