Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Starting/Stopping multiple instances of apache 6

 
chander shivdasani
Ranch Hand
Posts: 206
Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The default way of starting Tomcat is: $TOMCAT_HOME/bin/startup.sh, which uses $TOMCAT_HOME/conf/server.xml as its configuration file.

Is there a way to pass the configuration file through command line when calling startup.sh. I want to start multiple instances of tomcat on different ports.

Also, if the above thing is possible, is there a way to stop these instances individually. By means of passing some parameter to ./shutdown
 
Tim Holloway
Saloon Keeper
Posts: 18304
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
TOMCAT_HOME is partly my fault. There is no such thing as TOMCAT_HOME. There are actually two environment variables here: CATALINA_HOME and CATALINA_BASE. But I can never remember which is which, so I cheat and just say "TOMCAT_HOME".

Tomcat is split into 2 parts. One part is common to all instances of Tomcat. It contains things like the bin and lib directories.

The other part is replicated per-instance. It contains the work, temp and log directories. And conf, which is where the server.xml that defines what ports a given Tomcat instance uses.

So to run (and start/stop) multiple Tomcat instances, you no longer have CATALINA_HOME and CATALINA_BASE aimed at the same "TOMCAT_HOME" directory, but instead you have one CATALINA_HOME for all the Tomcats and a separate CATALINA_BASE for each Tomcat.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic