How to Install Tomcat 9 on Ubuntu 22.04

Apache Tomcat, also known as Tomcat Server, proves to be a popular choice for web developers building and maintaining dynamic websites and applications based on the Java software platform

In this tutorial, i am going to show you how to install the apache tomcat 9 server on the Linux ubuntu 22.04 system.

How to Install Apache Tomcat 9 Server on Ubuntu 22.04

Follow the below given steps to install the apache tomcat 9 server on Linux ubuntu 22.04 system:

  • Step 1 – Update System Dependencies
  • Step 2 – Installation of Java
  • Step 3 – Check the availability of Apache Tomcat package
  • Step 4 – Install Apache Tomcat Server on Ubuntu
  • Step 5 – Check ports for Apache Tomcat Server
  • Step 6 – Open ports for Apache Tomcat Server
  • Step 7 – Test working of Apache Tomcat Server

Step 1 – Update System Dependencies

Run the following command on command line to update system dependencies:

sudo apt update

Step 2 – Installation of Java

Install java by executing the following command on command line:

sudo apt install openjdk-11-jdk

Then, verify the version of the installed Java:

java version

Step 3 – Check the availability of Apache Tomcat package

Run the following command on command line to check the availability of the Apache Tomcat package:

sudo apt-cache search tomcat

Step 4 – Install Apache Tomcat Server on Ubuntu

Run the following command to install Apache Tomcat package on linux ubuntu:

sudo apt install tomcat9 tomcat9-admin

Step 5 – Check ports for Apache Tomcat Server

Run the following command on command line to check ports for apache tomcat server on linux ubuntu:

ss -ltn

The default port for the Apache Tomcat server is “8080” and it can be seen in the following output that port “8080” is listening for all incoming connections:

Step 6 – Open ports for Apache Tomcat Server

Run the following command on command line to permit the incoming from any type of source to port “8080”:

sudo ufw allow from any to any port 8080 proto tcp

Step 7 – Test working of Apache Tomcat Server

To test its working specify your system loopback address with the number of the opened port for Apache Tomcat Server:

http://127.0.0.1:8080

Conclusion

Through this tutorial, i have shown to you how to install apache tomcat 9 server on linux ubuntu 22.04 system.

More Tutorials

Be First to Comment

Leave a Reply

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