Tomcat - CATALINA_BASE 和 CATALINA_HOME 变量 [英] Tomcat - CATALINA_BASE and CATALINA_HOME variables
问题描述
我在同一台服务器 (Linux) 上运行了多个 tomcat 6 实例,并且它按预期工作.我试图找出关于设置 CATALINA_HOME
和 CATALINA_BASE
变量的标准做法是什么.
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.
在我的 tomcat 安装中,我设置了 CATALINA_HOME
指向一个common"文件夹(比如 /tomcat6
)和 CATALINA_BASE
变量因实例名称而异(比如/tomcat_instance1
、/tomcat_instance2
)
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
)
我的问题是:
- 我真的需要两个变量吗?
- 或者我可以只拥有一个
CATALINA_HOME
并取消CATALINA_BASE
(反之亦然)?
- Do I really need two variables?
- Or Can I just have one
CATALINA_HOME
and do away withCATALINA_BASE
(or vice-versa) ?
推荐答案
如果您在单个主机上运行多个 Tomcat 实例,您应该将 CATALINA_BASE
设置为等于 .../tomcat_instance1
或 .../tomcat_instance2
目录(适用于每个实例)和 CATALINA_HOME
环境变量到公共 Tomcat 安装,其文件将在两个实例.
If you are running multiple instances of Tomcat on a single host you should set CATALINA_BASE
to be equal to the .../tomcat_instance1
or .../tomcat_instance2
directory as appropriate for each instance and the CATALINA_HOME
environment variable to the common Tomcat installation whose files will be shared between the two instances.
CATALINA_BASE
环境是可选的,如果您在主机上运行单个 Tomcat 实例,在这种情况下将默认为 CATALINA_HOME
.如果您正在运行多个实例,则应该提供它.
The CATALINA_BASE
environment is optional if you are running a single Tomcat instance on the host and will default to CATALINA_HOME
in that case. If you are running multiple instances as you are it should be provided.
Apache Tomcat 发行版根目录下的 RUNNING.txt
文件在标题高级配置 - 多个 Tomcat 实例
There is a pretty good description of this setup in the RUNNING.txt
file in the root of the Apache Tomcat distribution under the heading Advanced Configuration - Multiple Tomcat Instances
这篇关于Tomcat - CATALINA_BASE 和 CATALINA_HOME 变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!