I'm new to Linux, and I don't understand why apt-get install tomcat6
resulted in two tomcat6
folders, one in /var/lib/
, the other in /usr/share/
. I'm sure there is a good reason for it, but it caused me a few hours confusion with nothing working.
What's the deal?
Tomcat Provides a mechanism where you can run multiple instances that all utilizes some common configuration elements. You would use the environment variables CATALINA_HOME
vs CATALINA_BASE
to configure tomcat(or corresponding properties). See 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."
So the default tomcat6 package in Ubuntu has a configuration that is friendly to people who run single instances as well as those who run multiple instances.
You can see that the tomcat6 package includes both:
/usr/share/tomcat6
/var/lib/tomcat6
If you are only running one instance of tomcat, then you probably want to use the /var/lib/tomcat6
location.
If by chance you(or other readers) are looking for scripts to automate installing multiple instances of Tomcat on a debian based distro, this one has worked well for me with some slight modifications.
As a developer, the best answer to this question is Don't use apt
to install Tomcat.
apt
is wonderful for most development tools, but there are exceptions, such as Tomcat and Eclipse.
So just download the zip
file, expand, and there you are. logs
, conf
, webapps
, bin
, lib
and everything else you could need in one place.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With