You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "James H. H. Lampert" <ja...@touchtonecorp.com.INVALID> on 2021/12/08 17:40:22 UTC

Updating Tomcat on an Amazon Linux 2 EC2 instance?

We have a Tomcat server running on an Amazon Linux 2 EC2 instance.

Off the top of my head, I don't remember how I originally installed it, 
but it's currently at 8.5.58.

I'd like to update it to 8.5.73, but I don't quite know how to do this 
in Amazon Linux 2 (now if somebody asked about installation or update on 
an IBM Midrange System, I could practically write a how-to manual).

Can somebody relieve my ignorance?

--
JHHL

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


Re: Updating Tomcat on an Amazon Linux 2 EC2 instance?

Posted by Christopher Schultz <ch...@christopherschultz.net>.
James,

On 12/8/21 13:14, James H. H. Lampert wrote:
> On 12/8/21 9:46 AM, jonmcalexander@wellsfargo.com.INVALID wrote:
>> I think it's going to come down to how the 8.5.58 was installed. Was
>> it via an rpm or zip file? I have used both methods and you should be
>> able to install the 8.5.73 without affecting the 8.5.58. If you are
>> using a separated CATALINA_BASE and CATALINA_HOME, then updating your
>> configuration should be super simple, especially if using symbolic
>> links to point to your Tomcat binaries.
> 
> At first, that answer didn't seem like it was telling me much, but then 
> I realized that it was telling me a great deal:
> 
> First, for some reason, I *thought* that Amazon Linux used apt, rather 
> than yum, but your mention of "rpm" said otherwise, and sure enough, 
> when I looked in the AWS docs, it does indeed use yum.
> 
> That, in turn, pointed me in the direction of looking up how to use yum.
> 
> That led me to try "yum check-update," which returned:
> . . .
>>  tomcat.noarch                 8.5.72-1.amzn2.0.1 amzn2extra-tomcat8.5
>>  tomcat-admin-webapps.noarch   8.5.72-1.amzn2.0.1 amzn2extra-tomcat8.5
>>  tomcat-el-3.0-api.noarch      8.5.72-1.amzn2.0.1 amzn2extra-tomcat8.5
>>  tomcat-jsp-2.3-api.noarch     8.5.72-1.amzn2.0.1 amzn2extra-tomcat8.5
>>  tomcat-lib.noarch             8.5.72-1.amzn2.0.1 amzn2extra-tomcat8.5
>>  tomcat-servlet-3.1-api.noarch 8.5.72-1.amzn2.0.1 amzn2extra-tomcat8.5
>>  tomcat-webapps.noarch         8.5.72-1.amzn2.0.1 amzn2extra-tomcat8.5
> . . .
> 
> and a bit more digging found "yum list installed," which returned:
> . . .
>>  tomcat.noarch                 8.5.58-1.amzn2  @amzn2extra-tomcat8.5
>>  tomcat-admin-webapps.noarch   8.5.58-1.amzn2  @amzn2extra-tomcat8.5
>>  tomcat-el-3.0-api.noarch      8.5.58-1.amzn2  @amzn2extra-tomcat8.5
>>  tomcat-jsp-2.3-api.noarch     8.5.58-1.amzn2  @amzn2extra-tomcat8.5
>>  tomcat-lib.noarch             8.5.58-1.amzn2  @amzn2extra-tomcat8.5
>>  tomcat-servlet-3.1-api.noarch 8.5.58-1.amzn2  @amzn2extra-tomcat8.5
>>  tomcat-webapps.noarch         8.5.58-1.amzn2  @amzn2extra-tomcat8.5
> . . .
> which matches what shows up in Manager.
> 
> So it does indeed appear that it was installed from an rpm file, via yum.
> 
> So how do I proceed from here? Would I do a "yum update tomcat.noarch"? 

The "noarch" is the architecture of the package, and should be 
automatically selected by the package manager.

$ sudo yum update tomcat

Should be all that is necessary.

I have a recommendation that you can take and/or ignore: monitor your 
system for upgrades and install when whenever they become available.

You can ask yum if there are any available package updates like this:

$ yum check-update

You'll get a list of the repositories to which you are subscribed and 
then a list of packages that have updates available. There are several 
monitoring systems that already know how to check a Linux system for 
updates and give you a notification: I would recommend that you enable that.

To update everything, you can just:

$ sudo yum update

You'll get a list of packages, their existing versions, and the new 
versions, and be asked if you want to proceed.

> And what about the webapp contexts and configuration settings (not to 
> mention the settings to allow me into manager) installed in the existing 
> Tomcat?

It is very unlikely that anything will change: only the stock files will 
be updated. apt/yum/rpm are very good about not clobbering your files.

You can try this:

$ sudo yum -v update --setopt tsflags=test tomcat

It should tell you which of your files may be updated. I'm not a 
yum-master, but this should get you a little more information than you 
had before.

> (For IBM Midrange updates, we have to take care of all that manually,
> as the update there amounts to a clean installation of the product in
> a default state.)

That's a shame. It can probably be done more easily, but it would 
require a bunch of up-front effort. It's up to you to decide whether 
it's worth that effort.

-chris

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


Re: Updating Tomcat on an Amazon Linux 2 EC2 instance?

Posted by "James H. H. Lampert" <ja...@touchtonecorp.com.INVALID>.
On 12/8/21 9:46 AM, jonmcalexander@wellsfargo.com.INVALID wrote:
> I think it's going to come down to how the 8.5.58 was installed. Was
> it via an rpm or zip file? I have used both methods and you should be
> able to install the 8.5.73 without affecting the 8.5.58. If you are
> using a separated CATALINA_BASE and CATALINA_HOME, then updating your
> configuration should be super simple, especially if using symbolic
> links to point to your Tomcat binaries.

At first, that answer didn't seem like it was telling me much, but then 
I realized that it was telling me a great deal:

First, for some reason, I *thought* that Amazon Linux used apt, rather 
than yum, but your mention of "rpm" said otherwise, and sure enough, 
when I looked in the AWS docs, it does indeed use yum.

That, in turn, pointed me in the direction of looking up how to use yum.

That led me to try "yum check-update," which returned:
. . .
>  tomcat.noarch                 8.5.72-1.amzn2.0.1 amzn2extra-tomcat8.5
>  tomcat-admin-webapps.noarch   8.5.72-1.amzn2.0.1 amzn2extra-tomcat8.5
>  tomcat-el-3.0-api.noarch      8.5.72-1.amzn2.0.1 amzn2extra-tomcat8.5
>  tomcat-jsp-2.3-api.noarch     8.5.72-1.amzn2.0.1 amzn2extra-tomcat8.5
>  tomcat-lib.noarch             8.5.72-1.amzn2.0.1 amzn2extra-tomcat8.5
>  tomcat-servlet-3.1-api.noarch 8.5.72-1.amzn2.0.1 amzn2extra-tomcat8.5
>  tomcat-webapps.noarch         8.5.72-1.amzn2.0.1 amzn2extra-tomcat8.5
. . .

and a bit more digging found "yum list installed," which returned:
. . .
>  tomcat.noarch                 8.5.58-1.amzn2  @amzn2extra-tomcat8.5
>  tomcat-admin-webapps.noarch   8.5.58-1.amzn2  @amzn2extra-tomcat8.5
>  tomcat-el-3.0-api.noarch      8.5.58-1.amzn2  @amzn2extra-tomcat8.5
>  tomcat-jsp-2.3-api.noarch     8.5.58-1.amzn2  @amzn2extra-tomcat8.5
>  tomcat-lib.noarch             8.5.58-1.amzn2  @amzn2extra-tomcat8.5
>  tomcat-servlet-3.1-api.noarch 8.5.58-1.amzn2  @amzn2extra-tomcat8.5
>  tomcat-webapps.noarch         8.5.58-1.amzn2  @amzn2extra-tomcat8.5
. . .
which matches what shows up in Manager.

So it does indeed appear that it was installed from an rpm file, via yum.

So how do I proceed from here? Would I do a "yum update tomcat.noarch"? 
And what about the webapp contexts and configuration settings (not to 
mention the settings to allow me into manager) installed in the existing 
Tomcat? (For IBM Midrange updates, we have to take care of all that 
manually, as the update there amounts to a clean installation of the 
product in a default state.)

--
JHHL

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


Re: One other thing, Re: Updating Tomcat on an Amazon Linux 2 EC2 instance?

Posted by Christopher Schultz <ch...@christopherschultz.net>.
James,

On 12/8/21 13:21, James H. H. Lampert wrote:
> Also, based on what "yum check-update" returned, it appears that at the 
> moment, I can only go as far as 8.5.72, rather than 8.5.73. Is there a 
> way to go all the way to 8.5.73 without fundamentally changing how 
> Tomcat is installed on that instance?

For my money, I'd stick to what the package manager provides if you want 
to use the package-manager. If you want to manage things yourself, you 
can always download the tarballs yourself. You get the advantage of 
having "more control" (including which version you take and when) along 
with the disadvantage of having to do all the work yourself.

-chris

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


One other thing, Re: Updating Tomcat on an Amazon Linux 2 EC2 instance?

Posted by "James H. H. Lampert" <ja...@touchtonecorp.com.INVALID>.
Also, based on what "yum check-update" returned, it appears that at the 
moment, I can only go as far as 8.5.72, rather than 8.5.73. Is there a 
way to go all the way to 8.5.73 without fundamentally changing how 
Tomcat is installed on that instance?

--
JHHL

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


RE: Updating Tomcat on an Amazon Linux 2 EC2 instance?

Posted by jo...@wellsfargo.com.INVALID.
I think it's going to come down to how the 8.5.58 was installed. Was it via an rpm or zip file? I have used both methods and you should be able to install the 8.5.73 without affecting the 8.5.58. If you are using a separated CATALINA_BASE and CATALINA_HOME, then updating your configuration should be super simple, especially if using symbolic links to point to your Tomcat binaries.

Dream * Excel * Explore * Inspire
Jon McAlexander
Infrastructure Engineer
Asst Vice President

Middleware Product Engineering
Enterprise CIO | EAS | Middleware | Infrastructure Solutions

8080 Cobblestone Rd | Urbandale, IA 50322
MAC: F4469-010
Tel 515-988-2508 | Cell 515-988-2508

jonmcalexander@wellsfargo.com
This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation.

> -----Original Message-----
> From: James H. H. Lampert <ja...@touchtonecorp.com.INVALID>
> Sent: Wednesday, December 8, 2021 11:40 AM
> To: Tomcat Users List <us...@tomcat.apache.org>
> Subject: Updating Tomcat on an Amazon Linux 2 EC2 instance?
> 
> We have a Tomcat server running on an Amazon Linux 2 EC2 instance.
> 
> Off the top of my head, I don't remember how I originally installed it, but it's
> currently at 8.5.58.
> 
> I'd like to update it to 8.5.73, but I don't quite know how to do this in Amazon
> Linux 2 (now if somebody asked about installation or update on an IBM
> Midrange System, I could practically write a how-to manual).
> 
> Can somebody relieve my ignorance?
> 
> --
> JHHL
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org