{"id":726,"date":"2015-06-23T13:11:19","date_gmt":"2015-06-23T11:11:19","guid":{"rendered":"http:\/\/dety.net.ua\/?p=726"},"modified":"2015-06-23T13:18:31","modified_gmt":"2015-06-23T11:18:31","slug":"several-tomcat-instances-on-the-same-server","status":"publish","type":"post","link":"https:\/\/dety.net.ua\/?p=726","title":{"rendered":"Several Tomcat instances on the same server"},"content":{"rendered":"<p>I needed in several instances of Tomcat(6,8, x86,x64) on the same server. I&#8217;ve done it.<\/p>\n<ul>\n<li>I installed JDK x86 and x64.<\/li>\n<li>I installed the first instance (Tomcat 6&#215;86) and downloaded zip-archive for Tomcat8x64, extracted it into the folder.<\/li>\n<li>I added initial strings in files &#8230;\/Tomcat8x64\/bin\/catalina.bat, &#8230;\/Tomcat8x64\/bin\/service.bat:<\/li>\n<\/ul>\n<blockquote><p>set CATALINA_HOME=c:\\Apache\\Tomcat8x64<br \/>\nset CATALINA_BASE=c:\\Apache\\Tomcat8x64<br \/>\nset JAVA_HOME=C:\\Progra~1\\Java\\jdk1.8.0_25<\/p><\/blockquote>\n<ul>\n<li>Ran service.bat:<\/li>\n<\/ul>\n<blockquote><p>service.bat install Tomcat8x64<\/p><\/blockquote>\n<ul>\n<li>Ran regedit and edit some parameters to increase memory for Tomcat (initial 1024Mb and Max to 4096):<\/li>\n<\/ul>\n<blockquote><p>[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Apache Software Foundation\\Procrun 2.0\\Tomcat8\\Parameters\\Java]<\/p>\n<p>&#8220;JvmMs&#8221;=dword:00000400<br \/>\n&#8220;JvmMx&#8221;=dword:00002000<\/p>\n<p>&#8220;Classpath&#8221;=&#8221;C:\\\\Apache\\\\Tomcat8x64\\\\bin\\\\bootstrap.jar;C:\\\\Apache\\\\Tomcat8x64\\\\bin\\\\tomcat-juli.jar&#8221;<\/p>\n<p>&#8220;Options&#8221;=&#8230; changed it with my path.<\/p><\/blockquote>\n<ul>\n<li>Edit ports in &#8230;\/Tomcat8x64\/conf\/server.xml. The ports must be different from ports in the other instances:<\/li>\n<\/ul>\n<blockquote><p>&lt;Server port=&#8221;8205&#8243; shutdown=&#8221;SHUTDOWN&#8221;&gt;<br \/>\n&lt;Connector port=&#8221;8082&#8243; protocol=&#8221;HTTP\/1.1&#8243;<br \/>\nconnectionTimeout=&#8221;20000&#8243;<br \/>\nredirectPort=&#8221;8445&#8243; \/&gt;<\/p>\n<p>&lt;Connector port=&#8221;8209&#8243; protocol=&#8221;AJP\/1.3&#8243; redirectPort=&#8221;8445&#8243; \/&gt;<\/p><\/blockquote>\n<ul>\n<li>Edit AJP-proxy in my Apache config:<\/li>\n<\/ul>\n<blockquote><p>&lt;Location \/&gt;<br \/>\nProxyPass ajp:\/\/127.0.0.1:8209\/<br \/>\nProxyPassReverse ajp:\/\/127.0.0.1:8209\/<br \/>\nOrder allow,deny<br \/>\nAllow from all<br \/>\n&lt;\/Location&gt;<\/p><\/blockquote>\n<ul>\n<li>Went to Services console and run the new Tomcat instance.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I needed in several instances of Tomcat(6,8, x86,x64) on the same server. I&#8217;ve done it. I installed JDK x86 and x64. I installed the first instance (Tomcat 6&#215;86) and downloaded zip-archive for Tomcat8x64, extracted it into the folder. I added initial strings in files &#8230;\/Tomcat8x64\/bin\/catalina.bat, &#8230;\/Tomcat8x64\/bin\/service.bat: set CATALINA_HOME=c:\\Apache\\Tomcat8x64 set CATALINA_BASE=c:\\Apache\\Tomcat8x64 set JAVA_HOME=C:\\Progra~1\\Java\\jdk1.8.0_25 Ran service.bat: service.bat [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-726","post","type-post","status-publish","format-standard","hentry","category-novosti"],"_links":{"self":[{"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/posts\/726","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dety.net.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=726"}],"version-history":[{"count":4,"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/posts\/726\/revisions"}],"predecessor-version":[{"id":730,"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/posts\/726\/revisions\/730"}],"wp:attachment":[{"href":"https:\/\/dety.net.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=726"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dety.net.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=726"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dety.net.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=726"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}