tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edponce <edpo...@appslm.com>
Subject Re: HOW TO install/setup 2 instances of tomcat on same server
Date Tue, 26 Aug 2008 14:05:45 GMT

DAvid
I am on windows, but i connect to the server via ssh so all the commands are
just like in Linux.
I've tried tomcat5 start, but i think that just works for the original
tomcat, also, how can i check that when i start the 2nd instsance of tomcat
it start with no errors.
Thank you
Eduardo


David Smith-2 wrote:
> 
> Ok ... forgive me if this was posted already, but what OS do you have 
> and how are you starting the production instance?  Windows systems 
> starting the production tomcat as a service is different than Linux/Unix 
> systems starting tomcat with jsvc or a service script.
> 
> --David
> 
> edponce wrote:
>> David,
>> Thanks for replying. I've duplicated my tomcat folder and renamed it and
>> ive
>> changed the 2 <connector> and the <server> shut down port. But i dunno
>> how
>> to start the duplicate instance. how can i do that!
>> Thank you,
>> Eduardo
>>
>>
>> David Smith-2 wrote:
>>   
>>>> Can any one please guide me on the correct direction so that i don't 
>>>> mess up
>>>> anything! I've never worked with Tomcat that is why i have no idea on 
>>>> how to
>>>> do it. 
>>>>       
>>> Yes.  Just open the server.xml file in tomcat's conf directory and look 
>>> for the <Connector ... /> elements that aren't wrapped in xml comments
( 
>>> <!-- --> ).  In those you will see port="8009" or whatever.  Just make

>>> sure they are all unique in both server.xmls.  Also change the port 
>>> number in the <Server ... > element so it doesn't conflict with the 
>>> other.  As an aside, I would recommend putting together a new 
>>> server.xml, removing all the xml comments to make an easier to read 
>>> server.xml.  Keep the original around for documentation/reference as 
>>> server.original.xml or whatever you like.
>>>
>>>     
>>>> You do not necessarily need two separate instances of Tomcat.
>>>> Under Tomcat, each application can be started and stopped (and even a 
>>>> new version reloaded) without stopping the Tomcat server. 
>>>>       
>>> Technically yes, but if you restart the app enough times you will run 
>>> out of memory and need to restart the service.  The max webapp restart 
>>> count is dependent on how big the webapp is as well as how much extra 
>>> memory tomcat has.  It's better to occasionally restart a dev instance 
>>> of tomcat than bounce a production instance when it stops responding.
>>>
>>> --David
>>>
>>> André Warnier wrote:
>>>     
>>>> André Warnier wrote:
>>>>       
>>>>> edponce wrote:
>>>>>         
>>>>>> I know this question has been asked a lot but I've read different

>>>>>> solutions
>>>>>> depending on the needs of the problem. I need to have 2 instances
of 
>>>>>> tomcat
>>>>>> on the same server for the same application. One would be for 
>>>>>> production and
>>>>>> the other for development (which can be start and stopped whenever

>>>>>> without
>>>>>> affecting the production one).
>>>>>>           
>>>>>>> From my understanding i need to have each instance on different

>>>>>>> ports and
>>>>>>>             
>>>>>> modifying some other files but what I am missing is the technical

>>>>>> things.
>>>>>> Can any one please guide me on the correct direction so that i don't

>>>>>> mess up
>>>>>> anything! I've never worked with Tomcat that is why i have no idea

>>>>>> on how to
>>>>>> do it.
>>>>>>           
>>>> Ok, serious now.
>>>> This is at the same time some information for you, the Original Poster 
>>>> (OP), and a question for the others on this list more Tomcat-qualified 
>>>> than I am.  But we've got to start somewhere...
>>>>
>>>> To the OP (and the others to contradict me if I'm wrong) :
>>>>
>>>> You do not necessarily need two separate instances of Tomcat.
>>>> Under Tomcat, each application can be started and stopped (and even a 
>>>> new version reloaded) without stopping the Tomcat server.
>>>> You would just need to "name" your applications differently.
>>>> (like "http://host.mycompany.com/real-app" and 
>>>> "http://host.mycompany.com/test-app").
>>>>
>>>> There also exists the possibility to run one Tomcat with different 
>>>> "Virtual Hosts", on the same port 80.
>>>> Each one of these virtual hosts would have a different "DNS name" 
>>>> (like  "realserver.mycompany.com" and "testserver.mycompany.com") and 
>>>> could have a different directory where the applications reside, but 
>>>> the application itself would be named the same way.
>>>>
>>>> I am mentioning the above two possibilities because, you knowing not 
>>>> much about Tomcat to start witj, either one of the above is probably 
>>>> easier to set up than two separate Tomcat instances.
>>>>
>>>> The difference between the above solutions and two really separate 
>>>> Tomcat instances would be if the test application could really crash 
>>>> the whole server, in which case you may not like one of the above 
>>>> solutions.
>>>>
>>>> Comments anyone ?
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>       
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>>     
>>
>>   
> 
> 
> -- 
> David Smith
> Programmer/Analyst
> College of Agriculture and Life Sciences
> Cornell University
> B32 Morrison Hall
> Ithaca, NY 14853
> Phone: (607) 255-4521
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/HOW-TO-install-setup-2-instances-of-tomcat-on-same-server-tp19079289p19162771.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message