Setup multiple instances of Tomcat on Windows as Windows service

The steps for the setting multiple Tomcat instances on Windows would work for Apache Tomcat installed by Windows Service Installer. For configuring several Tomcat instances installed as Windows application look at Running multiple Tomcat instances on Windows
  • Download and install Apache Tomcat as Windows Service. Check that the installation created windows service and you could stop and start Tomcat service
  • Copy the content of Tomcat directory from "C:\Program Files\Apache Software Foundation\Tomcat 6.0" into "C:\Program Files\Apache Software Foundation\Tomcat 6.0.2"
  • Modify shutdown port, HTTP and AJP connectors ports in "C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\server.xml" of a new instance with different ports
  • Run the script below to install a new windows service for a new Tomcat instance

    tomcat6 //IS//Tomcat6 --DisplayName="Apache Tomcat 6.0.2"
    --Install="C:\Program Files\Apache Software Foundation\Tomcat 6.0.2\tomcat6.exe"
    --Jvm=auto --StartMode=jvm --StopMode=jvm
    --StartClass=org.apache.catalina.startup.Bootstrap --StartParams=start
    --StopClass=org.apache.catalina.startup.Bootstrap --StopParams=stop

  • Start this new Apache Tomcat 6.0.2 service from Windows Services

2 comments:

Miguel said...

Nice tip, but ¿what about the Service Java Options? The virtual machine to use, the classpath and the JVM options are left blank if you install the service with that script.

Mirodil said...

The script did not create a new windows service.