tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George S." <geor...@mhsoftware.com>
Subject Re: daemon.sh and multiple tomcat instances
Date Thu, 07 Dec 2017 23:17:34 GMT
My technique is something like this on OpenSUSE:

in $CATALINA_BASE, I put bin/catalina.sh

It sources the file:

/etc/sysconfig/tomcat

In /etc/sysconfig/tomcat I define:

CATALINA_BASE
CATALINA_HOME
JAVA_OPTS

and a few others.

$CATALINA_BASE/bin/catalina.sh

starts tomcat via JSVC.

in my particular case, auto-startup isn't important, so I just run it by 
hand after a reboot. This is pretty much following OpenSUSE's 
configuration/methodology. Admittedly, separating out the defines from 
the script doesn't get me a great dealĀ  other than it makes it easier to 
maintain. Also, I'm unlikely to accidentally break the script.

There's no "clean" way to do this. If you were running on Windows, you'd 
have two service entries, and the relevant information (CATALINA_BASE, 
etc) would be in the registry.

If I liked systemd more, I'd probably try to figure it out, but it can 
be kind of tricky.

On 12/7/2017 1:47 PM, Chris Cheshire wrote:
> Apologies in advance for semi-OT sysadmin question.
>
> Tomcat 8.5.24, running on Centos 6. I have built jsvc according to
> instructions in distribution. I have two tomcat instances under
> different users (sandbox1, sandbox2) that have their own
> CATALINA_BASE. I can start these manually from the command line
> without a problem.
>
> How do I set up daemon.sh to run on boot for multiple users? Do I need
> to (as root), make a copy of daemon.sh under /etc/init.d for each user
> (tc_sandbox1, tc_sandbox2) and edit those to set the environment
> variables in it (CATALINA_HOME, CATALINA_BASE, JAVA_HOME,
> TOMCAT_USER), then use chkconfig to install the scripts?
>
> This seems kind of clunky to set up. Is this the right way to go about
> it or am I making it more complicated than it needs to be?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

-- 
George S.
*MH Software, Inc.*
Voice: 303 438 9585
http://www.mhsoftware.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message