> -----Original Message-----
> From: Milt Epstein [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 05, 2004 10:34 AM
> To: Tomcat Users List
> Subject: RE: context configuration file being overwritten
> 
> On Wed, 4 Feb 2004, Cox, Charlie wrote:
> 
> > > From: Milt Epstein [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, February 04, 2004 2:47 PM
> [ ... ]
> > > > Have you tried using CATALINA_BASE and CATALINA_HOME to separate
> > > > your webapps/configuration(BASE) and your tomcat
> > > > installation(HOME)?  Maybe this would serve your needs instead
> > > > of symbolic links.
> > > [ ... ]
> > >
> > > Thanks for the response.
> > >
> > > I am aware of using CATALINA_HOME/CATALINA_BASE, but I don't think
> > > that would serve my needs better.  That's more for when you're
> > > going to have multiple Tomcat instances, and you want to eliminate
> > > redundancy and reduce the amount of total space used.  And it
> > > still has problems when it comes to upgrades.
> >
> > Actually I am using CATALINA_HOME/CATALINA_BASE for a single
> > instance for the ease of upgrading. I have separated /webapps,
> > /conf, and /temp from /bin, /common, /shared, and /server. The only
> > issue that I see upon upgrade is that I need to copy my libs in
> > /common and /shared if I install the new version to a new directory
> > and change CATALINA_HOME appropriately. I'm interested to hear what
> > other issues you see with this as /conf wouldn't be affected by a
> > new tomcat point release to CATALINA_HOME.
> [ ... ]
> 
> Well, with the caveats that I don't have extensive experience with
> different Tomcat setups and I've only just come up with my current
> setup (so it's kind of a work in progress) ...
> 
> The setup I'm trying now has:
> 
> 1. the tomcat distrib under /usr/local
>    (e.g., /usr/local/jakarta-tomcat-5.0.18)
This can be your CATALINA_HOME

> 2. /usr/local/tomcat as a symbolic link to the "current" distrib
This may not be needed since you can just change CATALINA_HOME

> 3. all my webapps, with their associated context configuration files,
>    under /usr/local/webapps
> 
> So to get things working, all I do is copy the context configuration
> files to the appropriate Tomcat directory (it used to be
> <tomcat>/webapps in Tomcat 4, but in 5 it's apparently
> <tomcat>/conf/<engine>/<host>).  (I was hoping to use symbolic links,
> but then I ran into the problem I posted about.)
> 
This is the step you can avoid with CATALINA_BASE

> When I upgrade Tomcat versions, all I do is drop the new distrib in,
> change the /usr/local/tomcat link, 
you can just update CATALINA_HOME instead of changing you link, or you could
have CATALINA_HOME point to this link.

> copy the context configuration
This step can be avoided because you aren't changing CATALINA_BASE at all.

> files in, and voila!, I'm up and running.
> > Maybe the differences are minor as compared to your setup, but I think
> they are there.  For example, you may have to re-copy conf and/or
> webapps (I believe there can be changes in what's under those
> directories on new point releases). 
No, /webapps and /conf are part of your CATALINA_BASE. They only change on
point releases if you are using the tomcat supplied
webapps(tomcat-docs,examples,etc). The /manger and /admin are under
/server/webapps, so you would still get all changes to them.

> Basically you don't have to worry
> about splitting the distrib up between $CATALINA_HOME and
> $CATALINA_BASE, 

There is no splitting. For a new release, I delete /webapps, /logs, /conf
and /work that are created by default since these are all located at my
CATALINA_BASE.

> and any potential issues related to that that could
> come up with an upgrade to a new version.
> 

Well, there's always potential for bugs and that's why I have a test
environment.

So you can create a /usr/local/catalinabase that contains /conf and /work
and optionally /webapps and /logs (depends on server.xml settings). This is
your CATALINA_BASE.

Then you set CATALINA_HOME to /usr/local/tomcat if you want to maintain your
sym link, or to the actual tomcat installation dir. This contains /bin,
/common, /server, /shared, and /temp

This way only CATALINA_HOME changes with each release.

Charlie

> Milt Epstein
> Research Programmer
> Integration and Software Engineering (ISE)
> Campus Information Technologies and Educational Services (CITES)
> University of Illinois at Urbana-Champaign (UIUC)
> [EMAIL PROTECTED]

Reply via email to