Hi guys, I'm currently preparing a migration of our Operating System which handle our current tomcat installation from an OLD Linux using init scripts to a CentOS7 release using sytemd.
Because I don't want to disturb the way the old server handle the webapps (not yet :-) ), I have to start 2 separated instances of tomcat on the new machine. Using init script to boot multiples instance is quite easy, but know I'll use systemd and I have to adapt. I installed my OS and Tomcat from the CentOS repos, take a look at the tomcat.service unit and tomcat-sysd script to see how the things work. But now I'm a little bit disappointed, I don't understand how to have multiple instances. I created a tomcat@jcr.service unit file on my systemd directory and read about the steps to achieve. The first step said that *"by default SERVICE_NAME=tomcat. and must be defined BEFORE tomcat-sysd is called"* Well, OK, but how am I suppose to do that? Using environnement variables? PreStartExec directive? Environnement directive? I really don't get it, even looking at the tomcat-sysd wrapper script which indicate me HOW the system run multiple instance don't help me to understand WHERE am I suppose to put that information. I understand that I have to create a new unit file, a new /etc/sysconfig/tomcat file named according to the systemd unit, but I don't get it about the SERVICE_NAME. So if someone could help me a little bit, I'll be happy ^^