Skip to content

Instantly share code, notes, and snippets.

@isapir
Created March 11, 2018 22:52
Show Gist options
  • Select an option

  • Save isapir/5db3ed5fbdda626c4b6bb98a601a5534 to your computer and use it in GitHub Desktop.

Select an option

Save isapir/5db3ed5fbdda626c4b6bb98a601a5534 to your computer and use it in GitHub Desktop.
Tomcat template unit file for systemd
# /etc/systemd/system/tomcat@.service
[Unit]
Description=Tomcat %I
After=network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
# Tomcat config files
Environment=CATALINA_BASE=/etc/tomcat/%i
# Tomcat binary files
Environment=CATALINA_HOME=/usr/tomcat/apache-tomcat
ExecStart=/usr/tomcat/apache-tomcat/bin/startup.sh
ExecStop=/usr/tomcat/apache-tomcat/bin/shutdown.sh
User=tomcat
Group=www
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment