To install and configure a Tomcat instance on Windows OS:
- Download ASF Tomcat core binary distribution.
Caution: Do not use the Windows service Installer, as it is not flexible for setting up multiple instances.
- Unzip the apache-tomcat-6.0.35-windows-x86.zip contents to C:\opt\apache-tomcat-6.0.35.
Note: You can install tomcat into another folder side c:\opt.
- Create a Tomcat instance base folder:
C:\opt\instances\tc6035-example1
- Copy the bin, webapps, and conf folders from:
apache-tomcat-6.0.35 to tc6035-example1
- Create the empty temp, logs, work, and lib folders in:
tc6035-example1
- Copy the setenv.bat (attached to this article) to tc6035-example1\bin folder, or create your own setenv.bat.
- Modify these variables in setenv.bat to match your Tomcat deployment instance environment:
CATALINA_HOME=C:\opt\apache-tomcat-6.0.35
CATALINA_BASE=C:\opt\instances\tc6035-example1 (If not set, it defaults to CATALINA_HOME)
JVM_MODE=-client
JAVA_HOME=C:\path\to\your\JDK or JRE_HOME=C:\path\to\your\JRE
If not set, it looks for one in system profile.
Make any other custom JVM options change to setenv.bat if necessary. You may also need to re-configure your Tomcat server.xml connector ports, shutdown port, and make sure they are not already in use by other server instances.
- Use this script to stop the Tomcat instance in console mode:
C:\opt\instances\tc6035-example1\bin\{catalina.bat,startup.bat,shutdown.bat}
You can now deploy as many Tomcat instances as your platform can handle by copying the tc6035-example1 to tc6035-example2,tc6035-example3..n. You must always update each new instance's setenv.bat and server.xml files.
Note: A Tomcat instance is typically run as a Windows service. For information on running Tomcat as NT service, see
Running a Tomcat instance as a Windows service.