Skip to content

"Instructions for Setting Up Tomcat 11 on Ubuntu Version 24.04"

Instructions for Setting Up Apache Tomcat 11 on Ubuntu 24.04 for Running Java Web Applications

Instructions for Installing Tomcat 11 on Ubuntu 24.04 Operating System
Instructions for Installing Tomcat 11 on Ubuntu 24.04 Operating System

"Instructions for Setting Up Tomcat 11 on Ubuntu Version 24.04"

Ubuntu 24.04, a long-term support (LTS) release, provides a modern and secure environment for deploying Java web servers. One such server is Apache Tomcat 11, the latest version of an open-source Java servlet container and web server developed by the Apache Software Foundation.

This article outlines the steps to install Apache Tomcat 11 on Ubuntu 24.04. The process is similar to installing Tomcat 10, with the main differences being the download of the Tomcat 11 binary and the support for the Jakarta EE 11 specification.

  1. Update the System This ensures your package lists and installed packages are up to date.
  2. Install Java Tomcat 11 requires Java 17 or newer to run. Install OpenJDK 17: Verify the Java version: Output should mention or higher.
  3. Create a Dedicated Tomcat User For security, create a system user that will run Tomcat: This creates the user with home directory and no login shell.
  4. Download and Extract Apache Tomcat 11
  5. Go to Apache Tomcat's official archive or download site.
  6. Download the latest Tomcat 11 tar.gz file (for example):
  7. Extract it to :
  8. Set Permissions Ensures the tomcat user owns the installation and scripts are executable.
  9. Create a systemd Service File Create with contents similar to: ``` [Unit] Description=Apache Tomcat Web Application Container After=network.target

[Service] Type=forking

User=tomcat Group=tomcat

Environment="JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64" Environment="CATALINA_PID=/opt/tomcat/temp/tomcat.pid" Environment="CATALINA_HOME=/opt/tomcat" Environment="CATALINA_BASE=/opt/tomcat" Environment="CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC" Environment="JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom"

ExecStart=/opt/tomcat/bin/startup.sh ExecStop=/opt/tomcat/bin/shutdown.sh

Restart=on-failure

[Install] WantedBy=multi-user.target JAVA_HOME` path as needed based on your installation.

  1. Reload systemd and Start Tomcat This starts Tomcat and enables it to run on boot.
  2. Adjust Firewall (Optional) If you have a firewall enabled, allow HTTP traffic on port 8080:
  3. Verify Installation Open a browser and visit: You should see the Apache Tomcat welcome page.

Because official detailed instructions for Tomcat 11 specifically are not yet abundant, following the well-documented method for Tomcat 10 installation on Ubuntu 24.04 applies seamlessly to Tomcat 11 with the exception of downloading the Tomcat 11 binary instead.

If you want to install Tomcat using Ubuntu package manager, note that Debian/Ubuntu often provide Tomcat 10 packages, and Tomcat 11 may require manual installation from the Apache binary download since official apt packages for Tomcat 11 might not yet be widely available.

In summary, the installation mainly includes system update, Java installation, creating a Tomcat user, downloading and extracting the Tomcat 11 binary, setting permissions, creating a systemd service, and starting/enabling the service on Ubuntu 24.04. Tomcat 11 offers improved architecture, enhanced performance, and security features, making it an excellent choice for deploying Java web applications.

  1. Data-and-cloud-computing plays a crucial role in the deployment of modern Java web applications, as demonstrated by the use of cloud-based services for hosting the Apache Tomcat 11 server.
  2. To effectively utilize Tomcat 11 on data-and-cloud-computing environments, one must leverage the latest technology tools, such as Linux distributions like Ubuntu 24.04, for creating a secure and efficient infrastructure for their Java web applications.

Read also:

    Latest