linux - 为什么tomcat6在/var/lib/和/usr/share/都有文件夹?

标签 linux tomcat ubuntu installation

我是 Linux 新手,我不明白为什么 apt-get install tomcat6 会产生两个 tomcat6 文件夹,一个在 /var/lib/,另一个在/usr/share/。我确信这是有充分理由的,但它让我困惑了几个小时,没有任何效果。

这是怎么回事?

最佳答案

Tomcat 提供了一种机制,您可以在其中运行多个实例,这些实例都使用一些通用配置元素。您将使用环境变量 CATALINA_HOMECATALINA_BASE 来配置 tomcat(或相应的属性)。参见 this article for an explanation .

"The first properties (catalina.home) points to the location of the common information, while the other property (catalina.base) points to the directory where all the instance specific information are held."

所以 default tomcat6 package in Ubuntu具有对运行单个实例以及运行多个实例的人友好的配置。

您可以看到 tomcat6 package includes两者:

  • /usr/share/tomcat6
  • /var/lib/tomcat6

如果您只运行一个 tomcat 实例,那么您可能希望使用 /var/lib/tomcat6 位置。

如果您(或其他读者)碰巧正在寻找脚本来在基于 debian 的发行版上自动安装多个 Tomcat 实例,this one has worked well对我来说稍作修改。

关于linux - 为什么tomcat6在/var/lib/和/usr/share/都有文件夹?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1894657/

相关文章:

复制 C 文件以包含

linux - 从linux命令行抓图(uvccapture抓黑图)

c# - Ubuntu 上单声道的 log4net Udp appender 不记录

node.js - 如何使用 Nginx 和 Node.js 应用程序设置 Jenkins

linux - 将一个文件中的特定行替换为另一文件中包含的数据

Linux 非阻塞套接字 : how much data can be read before blocking?

tomcat - 在 intellij 中配置 'Run/Debug'

java - 如何在命令行中为 Tomcat 编译 servlet?错误 : package javax. servlet 不存在

java - 在 Struts2 webapp 中更改 DateFormat 或默认语言环境

linux - 从 bash 中的文件行获取字符串