Multiple Instances

Tomcat supports installation of multiple instances. You can have a single installation of Tomcat with multiple instances running on different IP/port combinations, or multiple Tomcat versions, each running one or more instances on different IP/ports.

Each instance folder will need the following structure:

  • conf
  • logs
  • temp
  • webapps
  • work

At a minimum, conf should contain a copy of the following files from CATALINA_HOME\conf\. Any files not copied and edited, will be picked up by default from CATALINA_HOME\conf, i.e. CATALINA_BASE\conf files override defaults from CATALINA_HOME\conf.

  • xml
  • xml

You must edit CATALINA_BASE\conf\server.xml to specify a unique IP/port for the instance to listen on. Find the line that contains <Connector port=”8080″ … and add an address attribute and/or update the port number so as to specify a unique IP/port combination.

 

To install an instance, first set the CATALINA_HOME environment variable to the name of the Tomcat installation directory. Then create a second environment variable CATALINA_BASE and point this to the instance folder. Then run “service install” command specifying a service name.

 

set CATALINA_HOME=c:\tomcat_8

set CATALINA_BASE=c:\tomcat_8\instances\instance1

service install instance1

 

To modify the service settings, you can run tomcat8w //ES//instance1.

For additional instances, create additional instance folder, update the CATALINA_BASE environment variable, and run the service install again.

 

set CATALINA_BASE=c:\tomcat_8\instances\instance2

service install instance2

Share this post
[social_warfare]
Debugging services
Windows Authentication

Get industry recognized certification – Contact us

keyboard_arrow_up