Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 79269 invoked from network); 27 Aug 2008 14:41:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Aug 2008 14:41:32 -0000 Received: (qmail 99511 invoked by uid 500); 27 Aug 2008 14:41:14 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 99491 invoked by uid 500); 27 Aug 2008 14:41:14 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 99377 invoked by uid 99); 27 Aug 2008 14:41:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Aug 2008 07:41:13 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Aug 2008 14:40:12 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1KYMCP-0002Wu-Ha for users@tomcat.apache.org; Wed, 27 Aug 2008 07:40:41 -0700 Message-ID: <19182454.post@talk.nabble.com> Date: Wed, 27 Aug 2008 07:40:41 -0700 (PDT) From: edponce To: users@tomcat.apache.org Subject: Re: HOW TO install/setup 2 instances of tomcat on same server In-Reply-To: <48B44103.4050909@cornell.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: edponce@appslm.com References: <19079289.post@talk.nabble.com> <48AC9F0F.9060207@ice-sa.com> <48ACA35C.4050003@ice-sa.com> <48AD5D92.5010702@cornell.edu> <19152853.post@talk.nabble.com> <48B33474.2080006@cornell.edu> <19162771.post@talk.nabble.com> <48B44103.4050909@cornell.edu> X-Virus-Checked: Checked by ClamAV on apache.org that is on windows... I am working on linux via ssh! I dont have anything installed on my PC... David Smith-2 wrote: >=20 > If you installed tomcat using the .exe installer, go get the .zip=20 > download and grab the service.bat file from it's bin directory. If you= =20 > installed .zip version of tomcat, you should have a file in the bin=20 > directory named service.bat. Service.bat can help you create new tomcat= =20 > services in the Windows environment, each with their own name for=20 > start/stop/restart. If you want to get custom with the setup, just take= =20 > a look at how the bat file creates a new service and then roll your own= =20 > from the command line. >=20 > --David >=20 > edponce wrote: >> 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: >> =20 >>> Ok ... forgive me if this was posted already, but what OS do you have= =20 >>> and how are you starting the production instance? Windows systems=20 >>> starting the production tomcat as a service is different than Linux/Uni= x=20 >>> systems starting tomcat with jsvc or a service script. >>> >>> --David >>> >>> edponce wrote: >>> =20 >>>> David, >>>> Thanks for replying. I've duplicated my tomcat folder and renamed it >>>> and >>>> ive >>>> changed the 2 and the shut down port. But i dunno >>>> how >>>> to start the duplicate instance. how can i do that! >>>> Thank you, >>>> Eduardo >>>> >>>> >>>> David Smith-2 wrote: >>>> =20 >>>> =20 >>>>>> Can any one please guide me on the correct direction so that i don't= =20 >>>>>> mess up >>>>>> anything! I've never worked with Tomcat that is why i have no idea o= n=20 >>>>>> how to >>>>>> do it.=20 >>>>>> =20 >>>>>> =20 >>>>> Yes. Just open the server.xml file in tomcat's conf directory and >>>>> look=20 >>>>> for the elements that aren't wrapped in xml comment= s >>>>> (=20 >>>>> ). In those you will see port=3D"8009" or whatever. Just m= ake=20 >>>>> sure they are all unique in both server.xmls. Also change the port= =20 >>>>> number in the element so it doesn't conflict with the= =20 >>>>> other. As an aside, I would recommend putting together a new=20 >>>>> server.xml, removing all the xml comments to make an easier to read= =20 >>>>> server.xml. Keep the original around for documentation/reference as= =20 >>>>> server.original.xml or whatever you like. >>>>> >>>>> =20 >>>>> =20 >>>>>> You do not necessarily need two separate instances of Tomcat. >>>>>> Under Tomcat, each application can be started and stopped (and even = a=20 >>>>>> new version reloaded) without stopping the Tomcat server.=20 >>>>>> =20 >>>>>> =20 >>>>> Technically yes, but if you restart the app enough times you will run= =20 >>>>> out of memory and need to restart the service. The max webapp restar= t=20 >>>>> count is dependent on how big the webapp is as well as how much extra= =20 >>>>> memory tomcat has. It's better to occasionally restart a dev instanc= e=20 >>>>> of tomcat than bounce a production instance when it stops responding. >>>>> >>>>> --David >>>>> >>>>> Andr=C3=A9 Warnier wrote: >>>>> =20 >>>>> =20 >>>>>> Andr=C3=A9 Warnier wrote: >>>>>> =20 >>>>>> =20 >>>>>>> edponce wrote: >>>>>>> =20 >>>>>>> =20 >>>>>>>> I know this question has been asked a lot but I've read different= =20 >>>>>>>> solutions >>>>>>>> depending on the needs of the problem. I need to have 2 instances >>>>>>>> of=20 >>>>>>>> tomcat >>>>>>>> on the same server for the same application. One would be for=20 >>>>>>>> production and >>>>>>>> the other for development (which can be start and stopped whenever= =20 >>>>>>>> without >>>>>>>> affecting the production one). >>>>>>>> =20 >>>>>>>> =20 >>>>>>>>> From my understanding i need to have each instance on different= =20 >>>>>>>>> ports and >>>>>>>>> =20 >>>>>>>>> =20 >>>>>>>> modifying some other files but what I am missing is the technical= =20 >>>>>>>> things. >>>>>>>> Can any one please guide me on the correct direction so that i >>>>>>>> don't=20 >>>>>>>> mess up >>>>>>>> anything! I've never worked with Tomcat that is why i have no idea= =20 >>>>>>>> on how to >>>>>>>> do it. >>>>>>>> =20 >>>>>>>> =20 >>>>>> Ok, serious now. >>>>>> This is at the same time some information for you, the Original >>>>>> Poster=20 >>>>>> (OP), and a question for the others on this list more >>>>>> Tomcat-qualified=20 >>>>>> 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=20 >>>>>> 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=20 >>>>>> "http://host.mycompany.com/test-app"). >>>>>> >>>>>> There also exists the possibility to run one Tomcat with different= =20 >>>>>> "Virtual Hosts", on the same port 80. >>>>>> Each one of these virtual hosts would have a different "DNS name"=20 >>>>>> (like "realserver.mycompany.com" and "testserver.mycompany.com") an= d=20 >>>>>> could have a different directory where the applications reside, but= =20 >>>>>> the application itself would be named the same way. >>>>>> >>>>>> I am mentioning the above two possibilities because, you knowing not= =20 >>>>>> much about Tomcat to start witj, either one of the above is probably= =20 >>>>>> easier to set up than two separate Tomcat instances. >>>>>> >>>>>> The difference between the above solutions and two really separate= =20 >>>>>> Tomcat instances would be if the test application could really crash= =20 >>>>>> the whole server, in which case you may not like one of the above=20 >>>>>> 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 >>>>>> >>>>>> =20 >>>>>> =20 >>>>> --------------------------------------------------------------------- >>>>> 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 >>>>> >>>>> >>>>> >>>>> =20 >>>>> =20 >>>> =20 >>>> =20 >>> --=20 >>> 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 >>> >>> >>> >>> =20 >> >> =20 >=20 >=20 > --=20 > David Smith > Programmer/Analyst > College of Agriculture and Life Sciences > Cornell University > B32 Morrison Hall > Ithaca, NY 14853 > Phone: (607) 255-4521 >=20 >=20 > --------------------------------------------------------------------- > 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 >=20 >=20 >=20 --=20 View this message in context: http://www.nabble.com/HOW-TO-install-setup-2-= instances-of-tomcat-on-same-server-tp19079289p19182454.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