{"id":12584,"date":"2026-08-12T12:23:42","date_gmt":"2026-08-12T18:23:42","guid":{"rendered":"https:\/\/www.mrc-productivity.com\/techblog\/?post_type=ht_kb&#038;p=12584"},"modified":"2026-08-12T13:53:22","modified_gmt":"2026-08-12T19:53:22","slug":"tomcat-minor-upgrade","status":"publish","type":"ht_kb","link":"https:\/\/www.mrc-productivity.com\/techblog\/?ht_kb=tomcat-minor-upgrade","title":{"rendered":"Tomcat Minor Version Upgrades"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Security and compliance are top priorities for any IT team. Because Tomcat can be exposed to the internet, it&#8217;s important that it stays up to date. Previously, checking for updates and upgrading Tomcat was a very time consuming process that needed to happen regularly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To eliminate this administrative overhead, mrc now provides an automated point-release upgrade script. Instead of manually downloading and installing individual Tomcat files, you can run a simple script that automatically checks for the latest minor revision, downloads it, and securely updates your environment.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How the Automated Script Works<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This script is designed to upgrade an existing Apache Tomcat installation to the <strong>latest point release of the same major version<\/strong> (for example, Tomcat 10.1.40 \u2192 10.1.52). It will never upgrade your server to a new major version (e.g., moving from Tomcat 9 to 10).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When executed, the script automatically handles the entire process:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Detects your installed Tomcat version and downloads the newest matching release directly from Apache (checksum-verified).<\/li>\n\n\n\n<li>Stops the Tomcat service.<\/li>\n\n\n\n<li>Backs up your existing lib, bin, and conf directories.<\/li>\n\n\n\n<li>Replaces the Tomcat program files.<\/li>\n\n\n\n<li>Restarts the Tomcat service and verifies it is running.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Your configuration is never modified.<\/strong> The script strictly preserves your conf directory (including server.xml), webapps, setenv files, and any custom JARs (like JDBC drivers) in your lib folder.<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\">If the upgraded server fails to start for any reason, the script will automatically restore the previous version so you experience minimal downtime.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Windows<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1. Download the Utility<\/strong>: Download the automated upgrade package to your server here: <strong><a href=\"https:\/\/www.mrc-productivity.com\/products\/tomcat\/upgrade-tomcat.zip\" target=\"_blank\" rel=\"noreferrer noopener\">Download Tomcat Upgrade Utility (.zip)<\/a><\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>2. Extract the Package<\/strong>: Extract the contents of the ZIP file directly into your root <code>m-power<\/code> directory. Once extracted, the <code>upgrade-tomcat<\/code> folder must sit directly next to your <code>tomcat<\/code> folder inside <code>m-power<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>m-power\/\n  tomcat\/            &lt;- The server being upgraded\n  upgrade-tomcat\/    &lt;- Extracted script directory<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>3. Run the Script<\/strong>: The easiest method on Windows is to run the batch file directly:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open File Explorer and navigate to <code>\\m-power\\upgrade-tomcat\\<\/code>.<\/li>\n\n\n\n<li>Right-click <code>upgrade-tomcat.bat<\/code> and select <strong>&#8220;Run as Administrator&#8221;<\/strong>.<\/li>\n\n\n\n<li>The script will execute the upgrade and keep the command window open so you can read the final result. (Alternatively, you can run <code>upgrade-tomcat.bat<\/code> from an elevated Command Prompt or PowerShell).<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Running With Arguments (Advanced)<\/strong>: Pass arguments to the execute script (only needed when the defaults don&#8217;t apply):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>upgrade-tomcat.bat -CatalinaHome \"D:\\somewhere\\tomcat\" -ServiceName Tomcat10 -HttpPort 8012<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Argument<\/strong><\/td><td><strong>Default when omitted<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong><code>-CatalinaHome<\/code><\/strong><\/td><td>The sibling <code>tomcat<\/code> folder next to this script folder.<\/td><\/tr><tr><td><strong><code>-ServiceName<\/code><\/strong><\/td><td>Auto-detected: the <code>tomcat*<\/code> Windows service whose install path matches the Tomcat folder being upgraded. If none matches, <code>shutdown.bat<\/code>\/<code>startup.bat<\/code> are used.<\/td><\/tr><tr><td><strong><code>-HttpPort<\/code><\/strong><\/td><td>Read from that Tomcat&#8217;s own <code>conf\\server.xml<\/code> (used only to verify stop\/start).<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-alert\"><strong>Note: <\/strong>If you run multiple Tomcat instances on one machine\u2014such as Development and Production\u2014each install should have its own copy of the upgrade-tomcat folder placed next to its respective tomcat directory.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Linux<\/h2>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-danger\"><strong>Note: <\/strong>These commands require superuser privileges (e.g., via sudo)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1. Download the Utility<\/strong>: Open your terminal and navigate to your <code>m-power<\/code> directory. Use <code>wget<\/code> to download the upgrade utility directly to the server:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/mrc\/development\/m-power\nwget https:\/\/mrc-productivity.com\/products\/tomcat\/upgrade-tomcat.zip<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>2. Extract the Package<\/strong>: Extract the contents so the <code>upgrade-tomcat<\/code> directory sits directly next to your <code>tomcat<\/code> folder:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>jar -xf upgrade-tomcat.zip<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>3. Run the Script<\/strong>: Navigate into the newly extracted directory, make the script executable (one-time change), and run it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd upgrade-tomcat\nchmod +x upgrade-tomcat.sh\n.\/upgrade-tomcat.sh<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Running With Arguments (Advanced)<\/strong>: Pass arguments to the execute script (only needed when the defaults don&#8217;t apply):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/upgrade-tomcat.sh -c \/opt\/somewhere\/tomcat -s tomcat.service -p 8012<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Argument<\/strong><\/td><td><strong>Default when omitted<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong><code>-c<\/code><\/strong> (catalina home)<\/td><td>The sibling <code>tomcat<\/code> folder next to this script folder<sup><\/sup>.<\/td><\/tr><tr><td><strong><code>-s<\/code><\/strong> (systemd service)<\/td><td>None \u2014 <code>shutdown.sh<\/code>\/<code>startup.sh<\/code> are used, run as the Tomcat folder&#8217;s owner<sup><\/sup>. If <code>-s<\/code> is given, the unit file must reference the same Tomcat folder<sup><\/sup>.<\/td><\/tr><tr><td><strong><code>-p<\/code><\/strong> (HTTP port)<\/td><td>Read from Tomcat&#8217;s own <code>conf\/server.xml<\/code> (used only to verify stop\/start).<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-alert\"><strong>Note: <\/strong>If you run multiple Tomcat instances on one machine\u2014such as Development and Production\u2014each install should have its own copy of the upgrade-tomcat folder placed next to its respective tomcat directory.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Good to Know<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Do Not Stop Tomcat:<\/strong> Tomcat is stopped and restarted automatically by the script. Do not stop the service yourself beforehand. Expect a brief outage while the files are replaced.<\/li>\n\n\n\n<li><strong>Internet Access Required:<\/strong> The server must have internet access to dlcdn.apache.org to download the new Tomcat release.<\/li>\n\n\n\n<li><strong>Backups:<\/strong> A timestamped backup folder (e.g., backup-&lt;old version&gt;-&lt;date&gt;) is left inside the Tomcat directory after completion. You can safely delete this once you verify everything is running smoothly.<\/li>\n\n\n\n<li><strong>Up-to-Date Systems:<\/strong> If your installation is already on the latest minor release, the script will simply exit without changing anything.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Automating the Upgrade Process<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">While this script is easy to run manually, you can also schedule it to run on a regular basis using your operating system&#8217;s built-in task management tools (such as Windows Task Scheduler or a Linux cron job). To set this up, simply configure your scheduler to execute the appropriate file for your environment:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Windows:<\/strong> upgrade-tomcat.bat<\/li>\n\n\n\n<li><strong>Linux:<\/strong> upgrade-tomcat.sh<br><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\"><strong>Note:<\/strong> Ensure your scheduled task is set to run with elevated administrative (Windows) or sudo (Linux) privileges so the script has the necessary permissions to automatically stop and restart the Tomcat service during the upgrade.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Security and compliance are top priorities for any IT team. Because Tomcat can be exposed to the internet, it&#8217;s important that it stays up to date. Previously, checking for updates and upgrading Tomcat was a very time consuming process that needed to happen regularly. To eliminate this administrative overhead, mrc&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[152],"ht-kb-tag":[],"class_list":["post-12584","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-administration"],"_links":{"self":[{"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/ht-kb\/12584","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12584"}],"version-history":[{"count":25,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/ht-kb\/12584\/revisions"}],"predecessor-version":[{"id":12646,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/ht-kb\/12584\/revisions\/12646"}],"wp:attachment":[{"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12584"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fht-kb-category&post=12584"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fht-kb-tag&post=12584"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}