Installing Tomcat 9 on Ubuntu 22.04 LTS

Introduction

Apache Tomcat is a web worker and servlet compartment that is utilized to serve Java applications. Tomcat is an open source usage of the Java Servlet and JavaServer Pages advancements, delivered by the Apache Software Foundation

Requirment

  • Root permission
  • Basic knowledge of linux commands

In this post, We will show you how to install tomcat 9 on ubuntu 22.04 LTS

Step 1:Update System

To update the system’s dependencies, use the command line option listed below:

sudo apt update

Step 2: Installation of Java 11

On the command line, run the following command to install Java:

sudo apt-get install openjdk-11-jdk -y

Then, verify the version of the installed Java:

java version

Step 3 – Check the availability of Apache Tomcat package

To see if the Apache Tomcat package is available, type the following command on the command line:

sudo apt-cache search tomcat

Step 4 – Install Apache Tomcat Server on Ubuntu

On Linux Ubuntu, execute the following command to install the Apache Tomcat package:

sudo apt-get install tomcat9 tomcat9-admin -y

Step 5 – Check ports for Apache Tomcat Server

To check the ports for the Apache Tomcat server on Linux and Ubuntu, run the following command on the command line:

ss -ltn

The output below demonstrates that port “8080,” which is the Apache Tomcat server’s default port, is listening for all incoming connections:

Step 6 – Open ports for Apache Tomcat Server

To allow incoming traffic from any source to port “8080,” run the following command on the command line:

sudo ufw allow from any to any port 8080 proto tcp

Step 7 – Test working of Apache Tomcat Server

To verify its operation, pair the number of the open port for Apache Tomcat Server with your system loopback address:

http://localhost:8080

Conclusion

We successfully installed Apache Tomcat 9 on Ubuntu 22.04 LTS; if you continue to have problems, please leave a comment below. 

Installing Tomcat 9 on Ubuntu 22.04 LTS

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top