Hi
Multiple instant in tomcat running on single server.we can achieve multiple instant on tomcat by differing the * HTTP connector port (e.g. use 8080, 8081 …)
* Shutdown port (e.g. use 8005, 8006…)
* AJP port (e.g. use 8009, 8010…) .we use multiple instant to ocvercome high availabilty of server if tomcat instant fails .we can achive second tomcat works for load balancing
First, download and install tomcat to whatever directory you choose. We will refer to this directory as CATALINA_HOME.
Now, repeat the following steps for each instance of tomcat you want to setup.
1. Create a new folder which will be your tomcat instance. Note that this should preferably not be in CATALINA_HOME. We will refer to this tomcat instance folder as CATALINA_BASE.
2. Copy the conf directory from CATALINA_HOME to CATALINA_BASE. (I think, strictly speaking, just copying the server.xml would suffice, but no harm in copying the whole directory for now).
3. Isolate your tomcat instance
Edit CATALINA_BASE\conf\server.xml file so that the following ports do not interfere with other Tomcat instances:
* HTTP connector port (e.g. use 8080, 8081 …)
* Shutdown port (e.g. use 8005, 8006…)
* AJP port (e.g. use 8009, 8010…)
Obviously if you have more than 4 instances, the shutdown and AJP ports will start to clash, so adapt accordingly (e.g. Shutdown = 9000, 9001; AJP = 9500, 9501 and HTTP continues with =8084, 8085…).
4. Create the following empty directories under CATALINA_BASE
* logs
* temp
* work
* webapps
Tomcat will use the first 3 as part of its normal running. The webapps directory is where you will place your projects.
5. Optional: Set up the default page and tomcat manager
Copy CATALINA_HOME\webapps\ROOT and CATALINA_HOME\webapps\manager to CATALINA_BASE\webapps.
This step is optional but will allow you access the default page (useful for ensuring tomcat is running properly) as well as the Tomcat Manager page (useful for managing tomcat and your deployed applications).