The difference between Catalina_base and Catalina_home

Source: Internet
Author: User
Tags tomcat

http://yuri-liuyu.iteye.com/blog/960964

What's the difference between Catalina_home and Catalina_base, before because they were all a little small-time to install a tomcat on the server, and then according to the previous configuration, will catalina_home and Catalina_ The base two value is set to Tomcat's directory (which is not precisely described here), and today we inadvertently see the company's installation documentation, which mentions the configuration of several Tomcat instances running, to figure out exactly what the difference is.


We can find the answer from the Tomcat 5.5 configuration document (http://tomcat.apache.org/tomcat-5.5-doc/config/host.html):


The description below uses the variable name $CATALINA _home to refer to the directory into which you have installed Tomcat 5, and is the base directory against which most relative paths are. However, if you are have configured Tomcat 5 for multiple instances by setting a catalina_base directory, your should use $CATA Lina_base instead of $CATALINA _home for all of these references.

From this description you can see the difference between Catalina_home and catalina_base. Simply put, Catalina_home is the Tomcat installation directory, and Catalina_base is the working directory for Tomcat. If we want to run multiple instances of Tomcat, but do not want to install more than one copy of Tomcat software. Then we can configure multiple working directories, each running instance exclusive of a working directory, but sharing the same installation directory.

Tomcat each run instance needs to use its own conf, logs, temp, webapps, work, and shared directories, so catalina_base points to these directories. While other directories include Tomcat binaries and scripts, Catalina_home points to these directories.

If we want to run another Tomcat instance, we can create a directory that copies the Conf, logs, temp, webapps, work, and shared to the directory, and then let Catalina_base point to the directory.

On a single server, you can run multiple Tomcat instances without having to install multiple tomcat, you can use different users, take the test user as an example, copy the/usr/local/apache-tomcat-6.0.18 directory to/home/test, delete/ Home/test/apache-tomcat-6.0.18/bin subdirectory (not required for this directory), edit/home/test/.bash_profile file, set Catalina_home point to the installation directory you just installed/usr/local/ apache-tomcat-6.0.18, set Java_home to point to the installation directory/usr/java/jdk1.6.0_11 just now. Set Catalina_base point to/home/test/apache-tomcat-6.0.18, set catalina_opts consistent with/root/.bash_profile (JMX management port with different port number)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.