Apache Tomcat®
Apache® and Apache Tomcat® are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries.
TuxCare's Endless Lifecycle Support (ELS) for Apache Tomcat® provides security patches and selected bug fixes that are integral to the stable operation of applications running on these versions of Apache Tomcat® core components such as Coyote, Catalina, Jasper, etc. These components have either reached their end of standard support from vendors or have reached End of Life (EOL). Our ELS for Apache Tomcat® service is designed to provide solutions for organizations that are not yet ready to migrate to newer versions and that are seeking long-term stability for their legacy Apache Tomcat® applications.
This guide outlines the steps needed for Apache Tomcat® server setup and configuration.
Apache Tomcat® is also available for installation as a library for Maven and Gradle projects. You can find the corresponding instructions here.
Supported Versions
- Apache Tomcat® 8.5.100, 9.0.46, 9.0.50, 9.0.75, 9.0.83, 9.0.87, 9.0.90, 9.0.100, 10.1.18, 10.1.42
Installation
Prerequisites
- Java Development Kit (JDK) 7 or later installed (verify with
java -version) JAVA_HOMEset to your JDK installation directory- Nexus repository access credentials (username and password) — contact sales@tuxcare.com
- To browse available artifacts, visit TuxCare Nexus and click Sign in in the top right corner. You may need to refresh the page after logging in.
Linux Installation
Prepare a
tomcatgroupCreate a
tomcatgroup:sudo groupadd tomcatCreate a
tomcatuserCreate a new user as a member of the
tomcatgroup, with a home directory of/opt/tomcatand the login shell set to/bin/false.sudo useradd -s /bin/false -g tomcat -d /opt/tomcat tomcatDownload the TuxCare build
Download from TuxCare using your credentials. For example, Apache Tomcat® 8.5.100:
curl -u USERNAME:PASSWORD -O https://nexus.repo.tuxcare.com/repository/els_java/org/apache/tomcat/tomcat/8.5.100-tuxcare.3/tomcat-8.5.100-tuxcare.3.tar.gzReplace
USERNAMEandPASSWORDwith your actual credentials.Create the installation directory and extract the archive
- Create the
/opt/tomcatdirectory:
sudo mkdir -p /opt/tomcat- Extract the archive into it:
sudo tar -xvzf tomcat-8.5.100-tuxcare.3.tar.gz -C /opt/tomcat --strip-components=1- Create the
Configure ownership and permissions
- Change to the installation directory:
cd /opt/tomcat- Change ownership of the installation to the
tomcatgroup:
sudo chgrp -R tomcat /opt/tomcat- Give the
tomcatgroup read access toconfand its contents, and execute access to theconfdirectory:
sudo chmod -R g+r conf sudo chmod g+x conf- Give the
tomcatuser write access towebapps,work,temp, andlogs:
sudo chown -R tomcat webapps/ work/ temp/ logs/Set
CATALINA_HOMEand reload the shell- Add the following line at the end of your
~/.bashrcfile, updating the path if needed.
export CATALINA_HOME=/opt/tomcatIf you're using a different shell, you may need to edit
~/.bash_profileinstead.- Reload the shell configuration:
source ~/.bashrc- Confirm the variable is set:
echo $CATALINA_HOME- Add the following line at the end of your
Start Apache Tomcat®
sudo -u tomcat /opt/tomcat/bin/startup.shVerify installation
Go to http://localhost:8080/. You should see the default Apache Tomcat® homepage.
Or check from the terminal (successful output is HTML from Tomcat®):
curl http://localhost:8080Stop Apache Tomcat®
sudo -u tomcat /opt/tomcat/bin/shutdown.sh
Windows Installation
Download Apache Tomcat®
Download the .zip archive from https://nexus.repo.tuxcare.com/repository/els_java/ using your credentials.
Extract the archive
Extract, for example,
apache-tomcat-8.5.100-tuxcare.3.zipto the installation directory, e.g.,C:\Tomcat.Open Environment Variables
Right-click This PC → Properties → Advanced system settings → Environment Variables.
Set
CATALINA_HOMEAdd a new system variable with the value
C:\Tomcat\apache-tomcat-8.5.100-tuxcare.3(or your installation path).Start Apache Tomcat®
Double-click
C:\Tomcat\apache-tomcat-8.5.100-tuxcare.3\bin\startup.bat.Verify installation
Go to http://localhost:8080/ in your browser. You should see the default Apache Tomcat® homepage.
Stop Apache Tomcat®
Double-click
C:\Tomcat\apache-tomcat-8.5.100-tuxcare.3\bin\shutdown.bat.
Logs Location
Check logs for detailed error information:
Linux:
/opt/tomcat/logs/catalina.outWindows:
C:\Tomcat\logs\catalina.[date].log