Apache Tomcat is an open-source web server and servlet container that implements the Java Servlet specifications.
It provides a Java HTTP web server environment for Java code to run.
To use Apache Tomcat, make sure that Java is properly installed and configured.
See the following page to install and configure Java:
Install Java (Ubuntu)
Download Apache Tomcat:
You can download Tomcat from the official Apache website:
http://tomcat.apache.org
For version compatibility information, visit:
Apache Tomcat Version Guide
Linux Installation:
Extract the downloaded file to your preferred installation directory.
In this example, we'll use /opt/:
$ tar -xf ~/Downloads/apache-tomcat-11.0.9.tar.gz -C /opt/
Set appropriate permissions for the Tomcat directory:
$ chmod -R 755 /opt/apache-tomcat-11.0.9/
$ sudo chown -R mtitek:mtitek /opt/apache-tomcat-11.0.9/
Create a symbolic link for easier access and future upgrades:
$ sudo ln -s /opt/apache-tomcat-11.0.9/ /opt/apache-tomcat
$ sudo chown -R mtitek:mtitek /opt/apache-tomcat
Replace
mtitek:mtitek with your actual user and group names.
Verify the installation by checking the Tomcat version:
$ /opt/apache-tomcat/bin/version.sh
Expected output:
Using CATALINA_BASE: /opt/apache-tomcat
Using CATALINA_HOME: /opt/apache-tomcat
Using CATALINA_TMPDIR: /opt/apache-tomcat/temp
Using JRE_HOME: /opt/jdk-24.0.2
Using CLASSPATH: /opt/apache-tomcat/bin/bootstrap.jar:/opt/apache-tomcat/bin/tomcat-juli.jar
Using CATALINA_OPTS:
Server version: Apache Tomcat/11.0.9
Server built: Jul 1 2025 20:39:04 UTC
Server number: 11.0.9.0
OS Name: Linux
OS Version: 5.15.167.4-microsoft-standard-WSL2
Architecture: amd64
JVM Version: 24.0.2+12-54
JVM Vendor: Oracle Corporation