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
指向常用文件夹(例如 / 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
适用于每个实例的目录和 CATA LINA_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.
在 RUNNING.txt中有一个非常好的描述/ code>标题高级配置 - 多个Tomcat实例
这篇关于tomcat - CATALINA_BASE和CATALINA_HOME变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!