Here is the fix, unsure if this is something the xwiki install should take care of on its own as it brings up the mysql service.
Create a systemd unit file
To make Tomcat run as a service open your text editor and create a tomcat.service
unit file in the /etc/systemd/system/
directory:
sudo nano /etc/systemd/system/tomcat.service
Paste the following content:
/etc/systemd/system/tomcat.service
[Unit]
Description=Tomcat 9 servlet container
After=network.target
[Service]
Type=forking
User=tomcat
Group=tomcat
Environment="JAVA_HOME=/usr/lib/jvm/jre"
Environment="JAVA_OPTS=-Djava.security.egd=file:///dev/urandom"
Environment="CATALINA_BASE=/opt/tomcat/latest"
Environment="CATALINA_HOME=/opt/tomcat/latest"
Environment="CATALINA_PID=/opt/tomcat/latest/temp/tomcat.pid"
Environment="CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC"
ExecStart=/opt/tomcat/latest/bin/startup.sh
ExecStop=/opt/tomcat/latest/bin/shutdown.sh
[Install]
WantedBy=multi-user.target
Copy
Save and close the file.
Notify systemd that we created a new unit file by typing:
sudo systemctl daemon-reload
Enable and start the Tomcat service: