Monday, January 30, 2017

CATALINA_HOME vs. CATALINA_BASE

Why are these two variables separated?
catalina.home points to the location of the common information.
catalina.base points to the directory where all the instance specific information are held.
So you have 1 home and can have more than 1 base.
When should they be separated? When should these two variables be the same?
If you have 1 tomcat you can set them to the same value but good practice would suggest you plan ahead and keep them separate: you never know if you need more than one tomcat. Ubuntu started following this way of thinking due to it being more logical: it makes it easier to run 2+ tomcats but does not disable running 1 tomcat where setting them both to the same value would require everyone to edit the base value. Makes more sense to keep them different.
What does this allow the administrator to do?
Allow for more than 1 tomcat to run at the same time where each tomcat instance can have their own apps.
What do you then place into each directory?
Home contains the binairy.
Base contains conf, logs, webapps, work and temp. 1 for every tomcat instance.

Where is catalina_base and catalina_home located for tomcat6?

Both are stored and can be set in /etc/default/tomcat6. By default, CATALINA_HOME is /usr/share/tomcat6, and CATALINA_BASE is /var/lib/tomcat6

Resource Link: http://askubuntu.com/a/46759

No comments:

Post a Comment