Skip to content

Instantly share code, notes, and snippets.

View mattocchi's full-sized avatar

Mirco Attocchi mattocchi

View GitHub Profile
@drmalex07
drmalex07 / README-tomcat-as-systemd-service.md
Last active February 26, 2025 15:22
An example configuration for Tomcat as systemd service. #tomcat #systemd #systemd.service

README

Let Tomcat is download and installed under /opt/tomcat. Also, let tomcat be a non-provileged user under which the server will be running.

We assume that we keep server's binaries under /opt/tomcat and we will create a server instance named foo under /var/tomcat/ (carrying its own conf, logs, webapps, work, lib directories). See also https://dzone.com/articles/running-multiple-tomcat.

Create a template service unit file at /etc/systemd/system/[email protected]: