Tomcat Upgrade from 9.x to 10.1.x (Linux)

This article outlines a systematic procedure for upgrading Apache Tomcat from version 9.0.x to 10.1.x on a Linux environment. Following these steps ensures application availability, minimizes downtime, and maintains configuration integrity. The process includes backing up existing configurations, upgrading Tomcat, reapplying critical settings, deploying application artifacts, and validating the environment after the upgrade.

Prerequisites

Before beginning the upgrade, ensure the following:

  • Administrator (root or sudo) privileges on the Linux server.

  • Java 17 is installed and configured as the default Java runtime.

  • Existing Tomcat installation is healthy and currently running without critical errors.

  • Sufficient disk space for backups and the new installation package.

  • Network access to download the latest Tomcat package or access to the pre-shared package provided by the OvalEdge team.

Upgrade Procedure

  1. Stop Tomcat Services and Backup Existing Installation

    • Stop the Tomcat service:

      sudo systemctl stop tomcat

      Sample Reference Screenshot:

    • Create a backup directory:

      mkdir -p /opt/tomcat_backup
    • Copy the current Tomcat installation to the backup location:

      cp -r /opt/tomcat /opt/tomcat_backup/tomcat_$(date +%F)

  1. Download the Latest Tomcat Release

  2. Extract Tomcat

    • Extract the package into /opt:

      Sample Reference Screenshot:

  3. Migrate setenv.sh

    • Copy the setenv.sh file from the previous installation:

      Sample Reference Screenshot:

      For Release 72, additional parameters must be added to setenv.sh. Refer to the extprop configuration document or updates from the OvalEdge team for further information.

  4. Deploy OvalEdge WAR and Third-Party JARs

    • Obtain the OvalEdge Release 72 WAR file from the team.

    • Deploy the WAR file to the webapps directory:

    • Replace third-party JARs:

      • Backup existing JARs:

      • Replace 6.3.4 JARs with the Release 72 JARs provided by OvalEdge.

  5. Configure server.xml

    • Review and update /opt/tomcat/conf/server.xml:

      • Ensure startup/shutdown ports and SSL configurations are correctly set.

      • Enable compression by adding the connector:

      Sample Reference Screenshots:

  6. Configure context.xml

    • Add caching to /opt/tomcat/conf/context.xml:

      Sample Reference Screenshot:

    • Save and close the file.

  7. Update Tomcat Service Configuration

    • Edit the Tomcat systemd service file (/etc/systemd/system/tomcat.service) to reflect the new installation path (/opt/tomcat).

    • Reload systemd to apply changes:

      Sample Reference Screenshot:

  8. Start Tomcat Service

    • Start Tomcat:

      Sample Reference Screenshot:

    • Enable auto-start at boot:

Testing and Verification

  • Access the application via browser at the configured URL.

  • Validate that the OvalEdge application functions as expected.

  • Monitor Tomcat logs for errors or warnings (logs/catalina.out, logs/catalina.YYYY-MM-DD.log, etc.):

    Sample Reference Screenshot:

  • Check rotated logs for startup errors:

Rollback Procedure

  • If issues occur during or after the upgrade:

    • Stop the new Tomcat service:

    • Restore the previous Tomcat backup:

    • Reload systemd and restart Tomcat:

    • Validate application functionality using the restored version.


Copyright © 2025, OvalEdge LLC, Peachtree Corners, GA, USA.

Last updated

Was this helpful?