Strange-looking tomcat6 directory structure

Asked by Rob Holman on 2010-05-09

Binary package hint: tomcat6

For whatever reason, the tomcat6 install in Lucid (and I think previous distros) is divided among /usr/share/tomcat6 and etc/tomcat6. However, the necessary symlink is not present to allow Tomcat to access conf files where it expects them to be, usr/share/tomcat6/conf. Also, the /logs folder doesn't exist, and thus will generate an error on startup unless the user creates this folder.

If there is a compelling reason not to honor the file-structure that the distribution of Tomcat uses, then at least the links and folders should be put in place to allow Tomcat to start successfully and function out of the box, without forcing the user to resort to using sudo privileges to fix it by hand.

Question information

English Edit question
Ubuntu tomcat6 Edit question
No assignee Edit question
Last query:
Last reply:

This question was originally filed as bug #577683.

Thierry Carrez (ttx) said : #1

This is a question due to a misunderstanding on how the Ubuntu/Debian distribution of Tomcat works, not a bug.

Thierry Carrez (ttx) said : #2

The compelling reason is called the FHS, which is what Linux distributions use to have consistent locations for configuration files, programs, data, etc.

Tomcat supports running from CATALINA_BASE and a CATALINA_HOME directory. In the " distribution", those are both set to the directory you unpack your tarball to.

In tomcat6 in Debian and Ubuntu, we set:
CATALINA_HOME = /usr/share/tomcat6
CATALINA_BASE = /var/lib/tomcat6
with links from /var/lib/tomcat6/conf -> /etc/tomcat6

/usr/share/tomcat6 contains programs that are shared by every instances.
The system instance runs from /var/lib/tomcat6 (with conf/ and logs/ subdirectories as expected).

For further info, see RUNNING.txt under /usr/share/doc/tomcat6-common/

Can you help with this problem?

Provide an answer of your own, or ask Rob Holman for more information if necessary.

To post a message you must log in.