微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

我是 Linux新手,我不明白为什么apt-get install tomcat6导致两个tomcat6文件夹,一个在/ var / lib /中,另一个在/usr/share /中.我确信它有充分的理由,但它让我几个小时的困惑,没有任何工作.

这是怎么回事?

解决方法

Tomcat提供一种机制,您可以在其中运行多个实例,这些实例都使用一些常用配置元素.您将使用环境变量CATALINA_HOME与CATALINA_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对我来说稍作修改.

原文地址:https://www.jb51.cc/linux/394786.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐