-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 12/18/2014 10:07 AM, Christopher Schultz wrote:
> Billy,
>
> On 12/18/14 9:25 AM, Billy Bones wrote:
>> Ok soooo, here is a small update.
>
>> I've finally found what does this SERVICE_NAME mean, indeed you
>> have to copy the original unit, then add the Systemd's directive
>> named Environment like this:
>
>> Environment="SERVICE_NAME=<YOUROWNSERVICENAMEHERE"
>
>> then you will copy the default tomcat config file found on the
>> /etc/sysconfig directory.
>
>> And as you supposed it Cristophe and Daniel, you then have to
>> copy the whole CATALINA_{HOME/BASE} or update the previous config
>> file to point out to another tomcat installation.
>
> You should not have to copy the whole CATALINA_HOME. Instead,
> create a CATALINA_BASE (which is basically just a few directories
> and a few configuration files) for each service and then set the
> CATALINA_BASE environment variable to point to each one for each
> service, set CATALINA_HOME to point to where the full installation
> of Tomcat is (with no web applications installed in it), and each
> service should operate independently.
>
> So you should be able to have something like this:
>
> SERVICE_NAME=tomcat-one CATALINA_HOME=/opt/apache-tomcat-7.0.57
> CATALINA_BASE=/opt/tomcat/tomcat-one
>
> SERVICE_NAME=tomcat-two CATALINA_HOME=/opt/apache-tomcat-7.0.57
> CATALINA_BASE=/opt/tomcat/tomcat-two
>
> Then you configure /opt/tomcat/tomcat-(one|two) to have the
> configuration and applications you want.
>
> You should be able to start tomcat-one and tomcat-two independently
> of each other. I don't know exactly what systemd does with all of
> this, but once you end up calling catalina.sh with the right
> environment variables set, Tomcat will do the right thing.
>
> -chris
Fedora 21 has a relatively nice systemd script for Tomcat. It's
designed for running multiple Tomcat instances.
If you have a copy of Fedora 21 and yumdownloader (by installing
yum-utils), you can take a look at the system with:
mkdir Temp
cd Temp
yumdownloader tomcat.noarch
rpm2cpio tomcat-7.0.54-3.fc21.noarch.rpm | cpio -idmv
All of the files are then accessible in the Temp directory.
I've never liked how Fedora / RedHat / CentOS scatter the components
all over the landscape. I'm thinking of adapting the Fedora systemd
scripts to work with Tomcats installed under a particular user.
The only issue seems to be that the SHUTDOWN_WAIT (time to wait in
seconds before killing the process) is documented not to work.
Sadly, I have some truly misbehaving applications that sometime need a
kill -9 on the underlying Tomcat. Those misbehaving applications are
unlikely to be fixed.
My init scripts take care of this by issuing an orderly shutdown
command, waiting up to SHUTDOWN_WAIT seconds (checking every second),
then issuing a kill -9 if the process still exists.
. . . better late than never (mostly)
/mde/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQEcBAEBAgAGBQJUkyEAAAoJEEFGbsYNeTwtxbEH/jsc5+ywzGWZneOU5eRDt6I6
k5DWaP0S7OeAEU4FIGN5IK2zGE5ioYITxxQQ+QtWn61QkqkOR4mb6fMe7wNERiP7
0hX4fs1SXA13H3MdeO1PXRGi0T9f0bnqPmSstpCLHVy7kavy/ywgammOir87moje
bw58Ga62iM/QhZIAcMksi2V255j+GdKOAgMG0Q9TKapMeDY1t3ywi/HJziTw8NAW
du/3eniAjM6SGi74GsYTkY44hM4yB7uXko3RDeU+A0I20gz9umWkRf5u39PiRUPL
RYMP8JAorjI8p4jt9ZnCPAwTrwrnvHLMnTFYYG10xQAkV9j22xgc0Hf49IMOq0k=
=1cES
-----END PGP SIGNATURE-----
---
This email is free from viruses and malware because avast! Antivirus protection
is active.
http://www.avast.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]