tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: how to upgrade tomcat 8.5.x?
Date Sat, 20 May 2017 23:37:16 GMT
Hash: SHA256


On 5/19/17 3:26 PM, Mark Eggers wrote:
> GB,
> On 5/19/2017 8:28 AM, gkk gb wrote:
>> If my current Tomcat is installed in
>> /home/tomcat/dir1/apache-tomcat-8.5.9
>> and then I install the latest Tomcat in
>> /home/tomcat/dir1/apache-tomcat-8.5.15
>> how does Apache web server know to connect to the newer version
>> of Tomcat? Is this established by the definition of CATALINA_HOME
>> in .bash_profile? Or, some other way?
> The connection is done (normally) via a port. It's either AJP and
> the AJP port configured in server.xml, or HTTP (could be HTTPS) and
> the HTTP (or HTTPS) port configured in server.xml
> This depends on how your Apache HTTPD server is configured.
> If you use the same ports, then only one Apache Tomcat can be
> running at a time (can't have two processes listen on the same port
> - technically address / port combination).
>> Can I install both Tomcat versions side by side and switch
>> between them to verify everything works fine with the newer
>> Tomcat before deleting the older Tomcat?
> Yep.
> 1. Install newer Tomcat 2. Make sure server.xml is set the way you
> need it to be 3. Copy web applications over to new Tomcat

I would always recommend using separate CATALINA_HOME and
CATALINA_BASE directories. You mention this below, but it's worth
reinforcing the fact that upgrades become even easier once this split
has been done.

> 4. Shut down old Tomcat 5. Start up new Tomcat 6. Test
> Then make a decision. If the your applications have difficulties
> with the new Tomcat, shut down the new Tomcat, start the old
> Tomcat, and debug the issues on a development / test environment.
> I do something similar to upgrade Tomcats, albeit with an Ant
> script, separate CATALINA_HOME / CATALINA_BASE, and an appBase
> outside of CATALINA_BASE.
> This allows me to install new Tomcat versions without taking down
> the old Tomcat. When it comes time to upgrade, I do the following:
> 1. Shut down the Tomcat service 2. Move two links to the new Tomcat
> version (CATALINA_HOME / CATALINA_BASE) 3. Start up the Tomcat
> service
> If there are issues, I can easily fall back to the old Tomcat
> with:
> 1. Shut down the Tomcat service 2. Move two links to the old Tomcat
> version 3. Start up the Tomcat service
> All of the server.xml modification information is kept in a set of 
> property files which are versioned. The Ant scripts use the
> property files to configure Tomcat instances.

This is roughly what we do as well: our ant-based build scripts build
server.xml (and context.xml for that matter) from a set of properties
that are specific to the application (and environment).

And of course Tomcat is started/stopped with those same scripts :)

Come to think of it... did I give you my Ant scripts ages ago? Or did
you develop your own? I think I may have promised to publish them, but
maybe never did.

- -chris

Comment: GPGTools -
Comment: Using GnuPG with Thunderbird -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message