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 -versionInstall 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 200Install 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.outStop and Restart
bin/shutdown.sh
bin/catalina.sh run # foreground run for debuggingEnvironment 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 connectorKey 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.