{"id":9234,"date":"2018-06-22T14:57:23","date_gmt":"2018-06-22T19:57:23","guid":{"rendered":"https:\/\/www.mrc-productivity.com\/docs\/?page_id=9234"},"modified":"2024-01-25T16:41:45","modified_gmt":"2024-01-25T22:41:45","slug":"instructions-for-upgrading-to-tomcat-9","status":"publish","type":"ht_kb","link":"https:\/\/www.mrc-productivity.com\/docs\/knowledge-base\/instructions-for-upgrading-to-tomcat-9","title":{"rendered":"Instructions for Upgrading to Tomcat 9"},"content":{"rendered":"\n<p>Tomcat 9 offers m-Power customers the latest security, performance, and stability improvements.<\/p>\n\n\n\n<p>As such this document is designed to give system administrators step by step instructions on how to upgrade from Tomcat 7 to Tomcat 9.<\/p>\n\n\n\n<p>Before we begin, please note these instructions are designed for <i>standard<\/i> installations. If you are utilizing any of the following, please consider engaging m-Power in a services agreements for us to do this conversion for you as we are familiar with these types of customized solutions:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Load Balancing<\/li>\n\n\n\n<li>Clustering<\/li>\n\n\n\n<li>SSL<\/li>\n\n\n\n<li>mod_jk to communicate between Tomcat\/Apache<\/li>\n\n\n\n<li>Custom Contexts<\/li>\n\n\n\n<li>Reverse Proxies<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Windows Instructions<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Uninstall existing Tomcat7 services<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Stop existing Tomcats<\/li>\n\n\n\n<li>Open CMD mode as Administrator<\/li>\n\n\n\n<li>Navigate to C:\\program files\\mrc\\development\\m-power\\tomcat\\bin<\/li>\n\n\n\n<li>Type <code>service remove TC7DEV<\/code><\/li>\n\n\n\n<li>Navigate to c:\\program files\\mrc\\production\\m-power\\tomcat\\bin<\/li>\n\n\n\n<li>Type <code>service remove TC7PROD<\/code><\/li>\n\n\n\n<li>Repeat for any other services you may have installed<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Install Tomcat<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Download the Windows version Tomcat 9 from mrc <a href=\"\/products\/Tomcat9\/tomcat-pc.zip\"><strong>here<\/strong><\/a><\/li>\n\n\n\n<li>Rename existing tomcat folder to tomcat 7<\/li>\n\n\n\n<li>Unzip downloaded file into c:\\program files\\mrc\\development\\m-power\\. When completed you should have a c:\\program files\\mrc\\development\\m-power\\tomcat folder<\/li>\n\n\n\n<li>Move tools.jar from tomcat7\\lib to tomcat\\lib<\/li>\n\n\n\n<li>If you connect to MSSQL or MySQL, move over the necessary jar files from tomcat7\\lib to tomcat\\lib<br><img decoding=\"async\" src=\"\/docs\/images\/drivers.png\"><\/li>\n\n\n\n<li>Examine server.xml in ..\\tomcat7\\conf. Specifically, note the shutdown port, connector port, and contexts. Ensure these changes are made within the server.xml in tomcat\\conf.<br><img decoding=\"async\" src=\"\/docs\/images\/shutdown.png\"><br><img decoding=\"async\" src=\"\/docs\/images\/main.png\"><br><img decoding=\"async\" src=\"\/docs\/images\/mapped.png\"><\/li>\n<\/ol>\n\n\n\n<p>Repeat the above process for your production instance (as well as any other instances you may have).<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\">The &#8220;\/webapp\/mrc&#8221; context is only used in your development environment, therefore you should only have the &#8220;\/mrcjava&#8221; context at the bottom of the server.xml file for your production instance(s).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Install Tomcat9 as a service<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open CMD mode as Administrator<\/li>\n\n\n\n<li>Navigate to c:\\program files\\mrc\\development\\m-power\\tomcat\\bin<\/li>\n\n\n\n<li>Type <code>service install TC9DEV<\/code><\/li>\n\n\n\n<li>Type <code>tomcat9w \/\/ES\/\/TC9DEV<\/code><\/li>\n\n\n\n<li>In the Java tab set the JVM to the appropriate jvm.dll (found in a path similar to C:\\Program Files\\Java\\jdk1.8.X_XX\\jre\\bin\\server\\jvm.dll<\/li>\n\n\n\n<li>In Java options, add the following:<br>-Xmx512m<br>-Xms512m<br>(Change the above to match your usage needs)<\/li>\n\n\n\n<li>Be sure that the Initial Memory Pool, Maximum memory pool, and Thread stack size inputs are all empty<\/li>\n\n\n\n<li>Back in the general tab. ensure that the startup type is Automatic<\/li>\n\n\n\n<li>Press Start<\/li>\n<\/ol>\n\n\n\n<p>Repeat the above process for your production instance (as well as any other instance you have)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Linux Instructions<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Download the Linux version of Tomcat 9 from mrc <a href=\"\/products\/Tomcat9\/tomcat-linux.zip\"><strong>here<\/strong><\/a><\/li>\n\n\n\n<li>Stop Existing Tomcat<\/li>\n\n\n\n<li>Rename existing Tomcat folder to Tomcat 7<\/li>\n\n\n\n<li>Unzip downloaded file into \/m-power. When completed you should have an m-power\/tomcat\/ folder<\/li>\n\n\n\n<li>Move tools.jar from tomcat7\/lib to tomcat\/lib<\/li>\n\n\n\n<li>If you connect to MSSQL or MySQL, move over the necessary jar files from tomcat7\/lib to tomcat\/lib.<\/li>\n\n\n\n<li>Examine the server.xml in &#8230;\/tomcat7\/conf. Specifically, note the shutdown port, connector port, and contexts. Ensure these changes are made within the server.xml in tomcat\/conf<\/li>\n\n\n\n<li>Ensure that the permission set to \/tomcat\/bin\/catalina.sh allows this file to be executable<\/li>\n<\/ol>\n\n\n\n<p>Once completed, repeat these steps for any other Tomcat instances you may running on the server (ie&#8230;.development, UAT, production, etc)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If Tomcat does not start, check the logs and see if it is complaining about duplicate entries in your web.xml file. If so, rename your \/mrcjava\/WEB-INF\/web.xml to web7.xml. Then download <strong><a href=\"\/products\/Tomcat9\/web.xml\">this<\/a> <\/strong>blank web.xml file into \/mrcjava\/WEB-INF\/web.xml. Finally, run the conversion process located in \/m-power named update-webxml.bat (as an Administrator) to populate the file.<\/li>\n\n\n\n<li>Any custom entries you made your web.xml will not be brought over in the conversion process. Instead, manually copy and paste the specific entries from web7.xml to web.xml.<\/li>\n\n\n\n<li>If you have any nightly processes that automatically restart Tomcat, ensure they are pointing at the new job name (applicable on windows)<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Tomcat 9 offers m-Power customers the latest security, performance, and stability improvements. As such this document is designed to give system administrators step by step instructions on how to upgrade from Tomcat 7 to Tomcat 9. Before we begin, please note these instructions are designed for standard installations. If you&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[261],"ht-kb-tag":[],"class_list":["post-9234","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-administration"],"_links":{"self":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/9234","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/comments?post=9234"}],"version-history":[{"count":19,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/9234\/revisions"}],"predecessor-version":[{"id":14015,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/9234\/revisions\/14015"}],"wp:attachment":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/media?parent=9234"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb-category?post=9234"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb-tag?post=9234"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}