Rexxer

Some tips for me and other

Several Tomcat instances on the same server

I needed in several instances of Tomcat(6,8, x86,x64) on the same server. I’ve done it.

  • I installed JDK x86 and x64.
  • I installed the first instance (Tomcat 6×86) and downloaded zip-archive for Tomcat8x64, extracted it into the folder.
  • I added initial strings in files …/Tomcat8x64/bin/catalina.bat, …/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 install Tomcat8x64

  • Ran regedit and edit some parameters to increase memory for Tomcat (initial 1024Mb and Max to 4096):

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\Procrun 2.0\Tomcat8\Parameters\Java]

“JvmMs”=dword:00000400
“JvmMx”=dword:00002000

“Classpath”=”C:\\Apache\\Tomcat8x64\\bin\\bootstrap.jar;C:\\Apache\\Tomcat8x64\\bin\\tomcat-juli.jar”

“Options”=… changed it with my path.

  • Edit ports in …/Tomcat8x64/conf/server.xml. The ports must be different from ports in the other instances:

<Server port=”8205″ shutdown=”SHUTDOWN”>
<Connector port=”8082″ protocol=”HTTP/1.1″
connectionTimeout=”20000″
redirectPort=”8445″ />

<Connector port=”8209″ protocol=”AJP/1.3″ redirectPort=”8445″ />

  • Edit AJP-proxy in my Apache config:

<Location />
ProxyPass ajp://127.0.0.1:8209/
ProxyPassReverse ajp://127.0.0.1:8209/
Order allow,deny
Allow from all
</Location>

  • Went to Services console and run the new Tomcat instance.

 

Comments are currently closed.