Installing Multiple Tomcat Instances Using Single Catalina Home
In this tutorial i am going to describe how to create multiple instances of Tomcat without having to install the software multiple times, This post will also clear your many doubt about CATALINA_HOME & CATALINA_BASE, So here we go.
Tomcat uses 5 Environment variables which are -
I am describing each variable one by one -
CATALINA_HOME Property points to the common files used by tomcat , basically it is a directory path which must contain “bin” & “lib” directories. These directories have files which runs the tomcat.
CATALINA_BASE points to the directory which contains instance/application specific directories. This directory must contain “conf”,“webapps”,“temp” and “logs” directories. if we are not setting CATALINA_BASE explicitly then tomcat searches these directories inside the CATALINA_HOME directory (mostly we do this). So tomcat provides you feature to take your CATALINA_BASE directory anywhere, even you can also run multiple tomcat instances by having multiple CATALINA_BASE & different different ports for each instance.