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.

Reference:

To install tomcat9 package:

  1. Install tomcat9 using apt-get:

    sudo apt install tomcat9
    
  2. Tomcat’s default port number is 8080. It can be modified in /etc/tomcat9/server.xml.

    <Connector port="8080" protocol="HTTP/1.1"
             connectionTimeout="20000"
             redirectPort="8443" />
    

    Note

    You will need to restart tomcat after doing this - sudo service tomcat9 restart

  3. Tomcat is a setup as a linux service:

    sudo service tomcat9 restart
    sudo service tomcat9 status
    
  4. You can access Tomcat using your web browser

    http://<hostname>:8080