Tomcat8 is being reinstalled while creating instan

2019-09-17 16:47发布

问题:

I tried this question on ServerFault, no response yet, trying here:

I have Tomcat8 installed on my instance with startup on reboot configured. Created an AMI from this instance. Now I see:

1) Tomcat was installed again (I can confirm this because, I have removed unnecessary webapps from webapps folder. These unnecessary wars are not there on my original instance).

2) Tomcat is not started by default (I think this could be due to that my start on reboot configuration is messed up).

Interestingly my custom war file is still there. Did anyone observe this? any suggestion on how I can overcome this and not do a fresh install?

回答1:

I think I figured out the issue. yum.conf (which is under /etc/) has a setting called "releasever" which by default is "latest".

Based on comment in yum.conf file

by default the yum configuration will point to the latest release of Amazon Linux AMI. If you prefer not to automatically move to new releases, comment out this line.

It seems there is newer version published to repo few days ago & due to this "latest" configuration enabled, AMI pulling newer version of Tomcat while creating instance.