LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-08-2012, 10:18 PM   #1
vannath
LQ Newbie
 
Registered: Apr 2012
Posts: 10

Rep: Reputation: Disabled
What is tomcat multiple instance ?


Any one can explain me about what is multiple instance in tomcat.

thanks,

Vannath
 
Old 05-09-2012, 12:08 AM   #2
sanjay87
Member
 
Registered: Oct 2011
Posts: 164

Rep: Reputation: Disabled
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).
 
1 members found this post helpful.
Old 05-09-2012, 01:13 AM   #3
vannath
LQ Newbie
 
Registered: Apr 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
Thumbs up

thanks
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
using Apache as a front end to a running Tomcat instance tkmsr Linux - Server 4 07-20-2010 09:32 AM
How to bind Tomcat instance to an IP? thomas2004ch Linux - Software 1 07-14-2010 06:25 AM
restricting multiple instance of a program V_Ganesh Programming 14 01-23-2008 10:42 AM
Multiple Sound Instance Problems sadarax Linux - Hardware 4 12-27-2006 11:35 AM
multiple instance of X satinet Linux - General 3 03-10-2005 01:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration