Installing and Running Tomcat

Harry · 12 Sep 2026 · 10 views

Requirements

Tomcat 10 needs Java 11+, Tomcat 11 needs Java 17+. Check your Java first:

java -version

Install on Ubuntu

sudo apt update
sudo apt install -y tomcat10 tomcat10-admin
sudo systemctl enable --now tomcat10
curl -I http://localhost:8080   # expect HTTP/1.1 200

Install from a Tarball (portable)

wget https://dlcdn.apache.org/tomcat/tomcat-10/v10.1.32/bin/apache-tomcat-10.1.32.tar.gz
tar -xzf apache-tomcat-10.1.32.tar.gz
cd apache-tomcat-10.1.32
bin/startup.sh          # Linux
bin\startup.bat         # Windows
tail -f logs/catalina.out

Stop and Restart

bin/shutdown.sh
bin/catalina.sh run   # foreground run for debugging

Environment Variables

  • JAVA_HOME - where your JDK is installed.
  • CATALINA_HOME - the Tomcat installation directory.
  • CATALINA_BASE - an instance directory (allows multi-instance servers).

Firewall

Open only the ports you need, on a private network if possible:

sudo ufw allow 8080/tcp    # HTTP (dev only)
sudo ufw allow 8443/tcp    # HTTPS when using the TLS connector

Key Points

  • Start with the supplied scripts and check catalina.out for errors.
  • Use CATALINA_BASE to run several isolated Tomcat instances.
  • JAVA_HOME must point at a real JDK/JRE matching your Tomcat version.
Share this post:

Comments (0)

Please login or register to comment.