Package Ubuntu Tomcat Install¶
Tomcat is available directly from the Ubuntu package manager. This approach is recommended as updates and security fixes are managed as part of your operating system.
Package version by release
Ubuntu 26.04 LTS and later package Apache Tomcat 11 (tomcat11), matching the version required by GeoServer.
Earlier releases, such as Ubuntu 24.04 LTS, only package Apache Tomcat 10.1.x (tomcat10). On those releases use the manual Tomcat install to run Tomcat 11 instead, or check apt-cache policy tomcat11 in case your release has since added a package.
Reference:
- Ubuntu documentation
- Ubuntu tomcat11 package
To install the tomcat11 package:
-
Install tomcat11 using apt-get:
-
Define
CATALINA_OPTSby creating /etc/tomcat11/bin/setenv.sh:#!/bin/sh # Prepend JVM Options CATALINA_OPTS="-XX:SoftRefLRUPolicyMSPerMB=36000 -XX:-UsePerfData ${CATALINA_OPTS}" # Append system properties CATALINA_OPTS="${CATALINA_OPTS} -Dorg.geotools.referencing.forceXY=true"Note
-Xjava options must be listed before any-Dsystem properties. -
Optional: By default Tomcat will use ¼ of system memory, to set a lower limit adjust
CATALINA_OPTSusingsetenv.sh. -
Optional: Tomcat's default port number is 8080. It can be modified in
/etc/tomcat11/server.xml. -
Tomcat is a setup as a linux service with start, status, restart and stop actions:
Changes to tomcat configuration such as
setenv.shandserver.xmlrequire service restart to take effect. -
You can access Tomcat using your web browser