Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Installing multiple Tomcat versions

 
Soren Fruergaard
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody!

I'm trying to set up an evironment on Windows 2003 server, where I have 2 Tomcat installations. One for testing/developing and one for production. I want to be able to uninstall/install the test version whenever a new version of Tomcat hits the streets, therefore it must be two installations.

When I try to install the second version (both version 5.5), I get an error message "Failed to install Tomcat5 service", i guess because the name Tomcat5 service name already exists in the registry.

I have tried to rename the tomcat5 service in the registry without any luck. I should add that I don't have much experience modifing the registry.

I hope somebody can help me solve this problem.

Thanks in advance.

Soren
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you need both to run as services?
If not, you can start the second Tomcat server from the command line with TOMCAT_HOME/bin/startup.bat.

If you need them both to be services, look at service.bat in the same bin directory. There are directions in the heading of the source file.
It can be used to install the service with any name you like.

You might need to download the *.zip version (as opposed to the *.exe version) to get these bat files.
 
Tad Dicks
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Running your production server and your test/development server on the same machine sounds like bad mojo. Why not run the test/development server on your desktop/development workstation?

There would be all sorts of conflicts beyond what your experience now. You'd have to make one run on a different port etc and do lots of changes. Things that might make it a pain to move the development code to the production server. Where as if you run the two on different machines you can make the environments identical.

Another alternative would be to have the production code run under one context and the development/test code run under another.

But to run two instances of tomcat at the same time, one of them being production and the other development/test sounds like a very bad idea.

-Tad
 
Soren Fruergaard
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks to both of you.

Using the zip version allowed me to start tomcat service with a name that I choose, just what i needed.

I am actually not going to use the server for for development. For this I will use my desktop. The idea behind the test instance is that users/clients also will be able to test application.

I agree that running on to separate machines would be the appropriate thing to do, but unfortunenately I'm on a tight budget and only one machine is available at this point.

Running the test and production in separate contexts using the same Tomcat instance isn't possible because I want to be able run different versions and further more be able to restart the test instance and not cause any affect on the production instance.

I will however consider running only one instance as a service, and start the other one with "/bin/startup.bat". But does this give me any advantages when configuring ports etc.?

Regards

Soren
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[qb]I will however consider running only one instance as a service, and start the other one with "/bin/startup.bat". But does this give me any advantages when configuring ports etc.?[/b]

No advantage whatsoever.
If you've got them both running as services, I would keep it that way. It used to be more difficult to get two service instances. I was only suggesting running from startup.bat to save you the trouble. You're already through it so, ignore that suggestion.

For development on your own machine you may want to consider it to avoid having the Windows Service lock your files.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic