You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jim Weill <mo...@icsi.berkeley.edu> on 2018/06/28 16:02:54 UTC

Updating tomcat Windows 2012r2

I'm on 8.5.6, and just downloaded 8.5.32 yesterday.  On my test machine 
I stopped the service, copied in the core files, copied over my 
server.xml, web.xml, and the hosted application and it seems to work 
just fine, and thinks it's running 8.5.32 when I look at the logs.  Is 
this correct for updating tomcat?  I feel like I'm missing something.....

jim


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


Re: Updating tomcat Windows 2012r2

Posted by "André Warnier (tomcat)" <aw...@ice-sa.com>.
Hi.

On 28.06.2018 18:02, Jim Weill wrote:
> I'm on 8.5.6, and just downloaded 8.5.32 yesterday.  On my test machine I stopped the
> service, copied in the core files, copied over my server.xml, web.xml, and the hosted
> application and it seems to work just fine, and thinks it's running 8.5.32 when I look at
> the logs.  Is this correct for updating tomcat?  I feel like I'm missing something.....
>

This question (or similar ones), comes up reularly on this list, and has been answered 
many times before. But it's true that the on-line documentation does not seem to have an 
easily-found, easily accessible answer for that.
So I'll tell you what I know.

Tomcat does not really "do updates" (or "patches")

In other words, you are supposed to just re-install it, using the latest available version.
The procedure for this varies somewhat between Windows and Linux, and for Windows it als 
depends on which install method you chose to install it initially.

The "canonical, approved" procedure goes along these lines :
- read the latest Release Notes (such as 
https://tomcat.apache.org/tomcat-8.5-doc/RELEASE-NOTES.txt) for any important tips
- shut down the old tomcat
- save a copy of your webapps
- save a copy of the old tomcat configuration files (or all of tomcat, if you have the room)
- de-install the old version
- install the new version as a fresh install, make sure it runs, then shut it down
- then carefully edit the new configuration files, bringing in the applicable old 
configuration sections which you previously changed from the old version (in 
conf/server.xml for example)
(some attributes may have changed with the new version, some things may now be deprecated, 
some new things may be needed etc.)
- start up tomcat, make sure it runs (without your applications), then shut it down again
- then carefully bring in your applications, start up tomcat, test

In the practice, between two "minor" versions within the same major version, it is 
relatively unfrequent that major strucural things will happen, so what you did above will 
probably work 90% of the time. (I would NOT do it between major versions, such as between 
8.0.x and 8.5.x, or 8.5.x and 9.0.x)
But there is always a chance that some jar would have been renamed, or split, or removed, 
or added, or moved to another directory for example, so you may miss something if you do 
this file by file.

In the specific case of the Windows "service installer", there are also settings related 
to the Service, which the installer puts in the Windows Registry, and which may have 
changed between versions. This, you would not catch with the file-by-file approach.
See here for more information : https://wiki.apache.org/tomcat/FAQ/Windows#Q11
(a bit outdated with respect to the listed versions, but still fundamentally valid)



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


Re: Updating tomcat Windows 2012r2

Posted by Mark Thomas <ma...@apache.org>.
On 28/06/18 17:02, Jim Weill wrote:
> I'm on 8.5.6, and just downloaded 8.5.32 yesterday.  On my test machine
> I stopped the service, copied in the core files, copied over my
> server.xml, web.xml, and the hosted application and it seems to work
> just fine, and thinks it's running 8.5.32 when I look at the logs.  Is
> this correct for updating tomcat?  I feel like I'm missing something.....

It depends on exactly what you copied from where to where. It also
depends on what files you edited in your original install.

Having read your email I'm not completely clear on what steps you took
to do the upgrade.

There are various approaches to handling upgrades. Separating
CATALINA_BASE and CATALINA_HOME (see RUNNING.txt for details) is
probably the best.

If you don't want to do that then something along these lines should work:

First install:
- Unpack 8.5.x zip distribution.
- Add your WAR file
- Edit config files as necessary
- Use service.bat to install service
- Start Tomcat

Upgrade:
- Unpack 8.5.y distribution
- Add your WAR file
- Apply config changes*
- Stop 8.5.x
- Uninstall 8.5.x service
- Install 8.5.y service
- Start Tomcat

*There are two approaches to applying the config changes.
1. Start with the 8.5.y files and apply the same changes as you made to
the 8.5.x files
2. Use the config file diff tool [1] to see what changed in each config
file between 8.5.x and 8.5.y and apply those changes locally

Generally, I'd avoid replacing JAR files etc. That approach can work
but, in my view, it is more prone to error and if it does go wrong you
might see some very strange errors.

Mark

[1] http://tomcat.apache.org/migration-85.html#Upgrading_8.5.x

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