-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Mark,

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

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlkg0yoACgkQHPApP6U8
pFhWgw/9HiS07rClspn20IoXUDtgpaf4yIiz//wlNyO1UBFSALFnsJGsX47S8FYO
U370Lnq6calG9ufOIT/Jg6256O1YbGjJn62mFZmXJ5WeSIONxIOB/GBovVHa96+A
lRv4Skp5Pr8AVpPuCq00ADken1kMIu/u8Baqr57TujaBjapq7fyDoxdFJ9/OSEuC
jN4AGso6wrbr/je3EheOnBtIb2VDC0ruxHmqbLcWAYGMVroGmpGL1sMQoN1wV9xr
DesVIfNlubT997HEYC+oVNccw21svRJFTLJ2FTrSD9RrJDGYM/biholfvI3OAQIO
ApmrXD4jpqQvcTYhdVxEMspkN14e71lEnPzGfExxoZ906t5hb8kRoDnjOx/T3Rve
2bYrx/vlTWlv9LhZu0eLppG+X3xh+6ZHveIf2ekz+MWg36W5Sk6O8JLCoA5eoGV/
EotPgKEqM2Ldc+5T52bOf9wQPvd4MC1NNT25at+awBzIvjPoo1nBhITcGdQg1yNH
+wlJHCOVJzWjACchXDpKxzLzRzadatFcRsiVsM6pCMIXd8Cj4LT5sqxejmpQHorW
7hvl3/ZCNjrmdWYcJMz4QFRahVyD4YX9ezEjMalZjYrGhEAOiiRxccyfdo/NZizG
byEjQDJp0MIbfFVdWwqWRa7bN4Y8zCizhR2rYYVNJMi6FigCw7o=
=TqXZ
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to