Can I get an OpenKM dev or Linux guru to chime in here?
Debian Linux is now using systemd out of the box...how about a proper systemd .service file? Here's what I've managed to figure out so far:
# cat /etc/systemd/system/tomcat.service
http://homepage.ntlworld.com/jonathan.d ... omcat.html
http://unquietwiki.blogspot.com/2015/05 ... at-as.html
Disclaimer: This may not be working 100% correctly! But it has been working fine in my setup (two users, 1.4 GB repo). I used this as an excuse to learn systemd, so I *barely* know what I am doing (ie. the service is running as root ). But it just seemed more natural to start and stop Tomcat with a systemd service file in the latest Debian. Also, the first link above has some pretty scathing things to say about the default Tomcat catalina.sh script, so I used it to deconstruct catalina.sh and try to get the proper Tomcat systemd startup.
Someone that knows...please help!
p.s. The script above makes reference to a tomcat environment file, I think this was from the original setup with catalina.sh?
# cat /etc/default/tomcat
Debian Linux is now using systemd out of the box...how about a proper systemd .service file? Here's what I've managed to figure out so far:
# cat /etc/systemd/system/tomcat.service
Code: Select all
Inspiration drawn from here:[Unit]
Description=Apache Tomcat Web Application Container
[Service]
User=root
Group=root
TimeoutStartSec=120
TimeoutStopSec=120
EnvironmentFile=-/etc/default/tomcat
After=network-online.target
KillMode=none
ExecStart=/usr/bin/env ${JAVA_HOME}/bin/java \
$LOGGING_CONFIG $LOGGING_MANAGER \
$JAVA_OPTS $CATALINA_OPTS \
-classpath ${CLASSPATH} \
-Dcatalina.base=${CATALINA_BASE} \
-Dcatalina.home=${CATALINA_HOME} \
-Djava.endorsed.dirs=${JAVA_ENDORSED_DIRS} \
-Djava.io.tmpdir=${CATALINA_TMPDIR} \
org.apache.catalina.startup.Bootstrap \
start
ExecStop=/usr/bin/env ${JAVA_HOME}/bin/java \
$LOGGING_MANAGER \
$JAVA_OPTS \
-classpath ${CLASSPATH} \
-Dcatalina.base=${CATALINA_BASE} \
-Dcatalina.home=${CATALINA_HOME} \
-Djava.endorsed.dirs=${JAVA_ENDORSED_DIRS} \
-Djava.io.tmpdir=${CATALINA_TMPDIR} \
org.apache.catalina.startup.Bootstrap \
stop
[Install]
WantedBy=multi-user.target
http://homepage.ntlworld.com/jonathan.d ... omcat.html
http://unquietwiki.blogspot.com/2015/05 ... at-as.html
Disclaimer: This may not be working 100% correctly! But it has been working fine in my setup (two users, 1.4 GB repo). I used this as an excuse to learn systemd, so I *barely* know what I am doing (ie. the service is running as root ). But it just seemed more natural to start and stop Tomcat with a systemd service file in the latest Debian. Also, the first link above has some pretty scathing things to say about the default Tomcat catalina.sh script, so I used it to deconstruct catalina.sh and try to get the proper Tomcat systemd startup.
Someone that knows...please help!
p.s. The script above makes reference to a tomcat environment file, I think this was from the original setup with catalina.sh?
# cat /etc/default/tomcat
Code: Select all
CATALINA_HOME=/opt/tomcat
CATALINA_BASE=/opt/tomcat
CATALINA_TMPDIR=/opt/tomcat/temp
JAVA_HOME=/usr/lib/jvm/java-7-oracle/jre
CLASSPATH=/opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar
JRE_HOME=/usr
LOGGING_CONFIG="-Dnop"
LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
JAVA_OPTS=" -Xms256m -Xmx1256m -XX:PermSize=256m -XX:MaxPermSize=512m -Djava.awt.headless=true -Dlog4j.configuration=file:/opt/tomcat/conf/log4j.properties -Dfile.encoding=utf-8 -Dmail.mime.ignoreunknownencoding=true"