Michael, 
-----Original Message-----
> From: Christopher Schultz <ch...@christopherschultz.net>
> Sent: Wednesday, November 17, 2021 9:43 AM
> To: users@tomcat.apache.org
> Subject: Re: How to *properly* create and use a CATALINA_BASE installation
> 
> Michael,
> 
> On 11/16/21 17:05, Michael B Allen wrote:
> >>
> https://urldefense.com/v3/__https://people.apache.org/*schultz/presen
> >>
> tations/ApacheCon*20NA*202020/Splitting*20Your*20Tomcat*20Installatio
> >> n.pdf__;fiUlJSUl!!F9svGWnIaVPGSwU!_kcg_WiI54imo-
> Pk9CgIH3DFhNeZ6MiQRzP
> >> vO3TKe8Um2xd0TTEljpBc1_gS2D0FwomA3A0$
> >
> > Thanks. That's what I'm looking for.
> >
> > Slightly related: Instead of setting environment variables in your
> > profile and running $CATALINA_HOME/bin/startup.sh, is there any reason
> > why we should not create a $CATALINA_BASE/bin/startup.sh like the
> > following?
> >
> > #!/bin/sh
> > export JRE_HOME=/path/to/jre/
> > export CATALINA_HOME=/path/to/tomcat/
> > export CATALINA_BASE=/path/to/tomcat-base/
> > ${CATALINA_HOME}/bin/catalina.sh run "$@"
> >
> > and use this instead?
> >
> > It seems to me this would completely separate the installation from
> > the host and environment.
> 
> I would not set CATALINA_BASE in my profile for a number of reasons -- the
> primary one being that I run multiple applications in separate Tomcats, so
> there is no one single CATALINA_BASE that I could set.
> 
> What you have above is, IMO, the "right" way to do things, except that I
> wouldn't use startup.sh -- I'd use a different script as not to 
> conflict/confuse
> with the one that comes from Tomcat.
> 
> -chris
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org

This is why I use the setenv.sh file on Unix/Linux, setenv.bat on Windows, when 
not using as a services. If setup as a service on windows, I add the 
CATALINA_BASE to the JAVA OPTIONS section.

I, in my opinion, find it far easier to set my BASE in the setenv.sh for the 
instance I'm using. As Chris said, you can have multiple instances (BASEs) on a 
server.

Thanks,

Reply via email to