关于CATALINA_BASE

对CATALINA_BASE目录的官方推荐:

  • The bin directory with the setenv.sh, setenv.bat, and tomcat-juli.jar files.

    Recommended: No.

    Order of lookup: CATALINA_BASE is checked first; fallback is provided to CATALINA_HOME.

  • The lib directory with further resources to be added on classpath.

    Recommended: Yes, if your application depends on external libraries.

    Order of lookup: CATALINA_BASE is checked first; CATALINA_HOME is loaded second.

  • The logs directory for instance-specific log files.

    Recommended: Yes.

  • The webapps directory for automatically loaded web applications.

    Recommended: Yes, if you want to deploy applications.

    Order of lookup: CATALINA_BASE only.

  • The work directory that contains temporary working directories for the deployed web applications.

    Recommended: Yes.

  • The temp directory used by the JVM for temporary files.

    Recommended: Yes.

不建议修改 tomcat-juli.jar file。 然而,如果您需要自己的日志记录实现,你可以在特定tomcat的实例的CATALINA_BASE中替换tomcat-juli.jar

我们也建议你复制CATALINA_HOME/conf所有的文件到CATALINA_BASE/conf的目录中。万一CATALINA_BASE缺失某个配置文件,该tomcat实例并不会去CATALINA_HOME中复查。因此,可能会启动失败。

最起码,CATALINA_BASE必须包含:

  • conf/server.xml
  • conf/web.xml
这包括conf目录。否则,Tomcat将无法启动,或者无法正常运行。

关于高级配置,查看RUNNING.txt文件。

posted on 2018-12-13 14:18  问天涯  阅读(224)  评论(0编辑  收藏  举报

导航