How to set Catalina_home in Ubuntu

CATALINA_HOME vs. CATALINA_BASE


I can't find a definitive answer to why Ubuntu set the environment variable to be different from. I found this document which suggests that failure to recruit would make it equivalent. This document also suggests making settings to make multiple instances available.

However, I don't seem to find anything that explains this. Probably running with a single was good for a long time, but Ubuntu switched.

I found this question with a lighting answer on AskUbuntu but there isn't much specifically on the vs. This question alludes to the "appBase" parameter, which is documented in the Tomcat6 documentation for the host container in the configuration file.

Here are the questions: Why are these two variables separated? When should they be separated? What can the administrator do with it? Then what do you put in each directory? When should these two variables be the same? What does ASF recommend for standard practice?


Reply:


Why are these two variables separate?

katalina.home points to the location of the general information.
Catalina.base points to the directory in which all instance-specific Information is stored.

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 a hangover, you can set it to the same value. However, good practice recommends that you plan ahead and keep him separate: you never know if you will need more than one hangover. Ubuntu followed this mindset as it was more logical: it makes it easier to run 2+ tomcats, but doesn't disable running 1 tomcat when both need to be set to the same value and each need to edit the base value. It makes more sense to keep them different.

What can the administrator do with it?

Allow more than one Tomcat to run at the same time, with each Tomcat instance having its own apps.

Then what do you put in each directory?

Home contains the binairy.
Base contains conf, logs, webapps, work and temp. 1 for each Tomcat instance.


vs.

If you run several instances, you otherwise only need both variables.

In other words, it is required and optional.

represents the root directory of your Tomcat installation.

Optionally, Tomcat can be configured for multiple instances by defining for each instance. Unless multiple instances are configured, this is the same as.

See: Apache Tomcat 7 - Introduction

Runs with separately and is documented in RUNNING.txt that say:

The variables and and environment variables are used to specify the location of Apache Tomcat or the location of its active configuration.

You cannot configure and use variables in the script because they are used to find the file.

For example:

(4.1) Tomcat can be started by executing one of the following commands:

or

Multiple Tomcat instances

In many cases, it is desirable to have a single copy of a Tomcat binary distribution shared by multiple users on the same server. To enable this, you can set the environment variable to the directory that contains the files for your 'personal' Tomcat instance.

When running with a separate and, the files and directories are divided as follows:

In :

  • - Only: setenv.sh (* nix) or setenv.bat (Windows), tomcat-juli.jar
  • - Server configuration files (including server.xml)
  • - Libraries and classes as explained below
  • - Log and output files
  • - Automatically loaded web applications
  • - Temporary working directories for web applications
  • - Directory used by the JVM for temporary files>

In :

  • - Startup and shutdown scripts
  • - Libraries and classes as explained below
  • - Libraries that overwrite the "Endorsed Standards" standard. It is missing by default.

How to check

The easiest way to check what's yours and is by running, for example:

You can also use the following tool (Debian / Ubuntu) to check where the Tomcat files are installed:


Not only is it the best way to run two Tomcat instances, but it also makes it easy to update.

I am using this setup.

CATALINA_HOME = / opt / apache-tomcat-7

refers to one or the other deployment directory.

Basic programs and libraries are easy to copy, (and some other files, read the documentation, please) and create directories is, logs, webapps, temp, work (RTLM, L for lovelly, please)

You can update Tomcat binaries by changing the $ CATALINA_BASE / bin / setenv.sh file for each instance, or you can simply change the symbolic link and update the binaries "globally".

It's easier to update even if you only have one instance.

We use cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.

By continuing, you consent to our use of cookies and other tracking technologies and affirm you're at least 16 years old or have consent from a parent or guardian.

You can read details in our Cookie policy and Privacy policy.