I have multiple instances of tomcat 6 running on the same server (Linux) and it works as expected. I am trying to find out what the standard practice is with regards to setting the CATALINA_HOME and CATALINA_BASE variables.
In my tomcat installation, I have setup CATALINA_HOME to point to a “common” folder (say /tomcat6) and the CATALINA_BASE variable varies depending on the instance name (say /tomcat_instance1, /tomcat_instance2)
My question is this:
- Do I really need two variables?
- Or Can I just have one
CATALINA_HOMEand do away with
CATALINA_BASE(or vice-versa) ?
If you are running multiple instances of Tomcat on a single host you should set
CATALINA_BASEto be equal to the.../tomcat_instance1or.../tomcat_instance2directory as appropriate for each instance and theCATALINA_HOMEenvironment variable to the common Tomcat installation whose files will be shared between the two instances.The
CATALINA_BASEenvironment is optional if you are running a single Tomcat instance on the host and will default toCATALINA_HOMEin that case. If you are running multiple instances as you are it should be provided.There is a pretty good description of this setup in the
RUNNING.txtfile in the root of the Apache Tomcat distribution under the heading Advanced Configuration – Multiple Tomcat InstancesSee also the documentation of Apache Tomcat 10/Introduction/CATALINA_HOME and CATALINA_BASE.