Install Apache Tomcat on Linux

This section provides a tutorial example on how to install Apache Tomcat on Linux systems.

Install Apache Tomcat on a Linux system is easy. Here is how I did on a CentOS 8 system.

1. Make that JRE (Java Runtime Environment) is installed and working:

herong$ java -version 

openjdk version "17.0.1" 2021-10-19 LTS
OpenJDK Runtime Environment 21.9 (build 17.0.1+12-LTS)
OpenJDK 64-Bit Server VM 21.9 (build 17.0.1+12-LTS, mixed mode, sharing)

2. Go to Tomcat archive Website at archive.apache.org/dist/tomcat/ and click on the latest stable version number, "tomcat-10/v10.1.9/bin".

3. Click on the *.tar.gz file, apache-tomcat-10.1.9.tar.gz, to download it. You can also use the "wget" command to download it without using a Web browser:

wget downloads.apache.org/tomcat/tomcat-10/v10.1.20/bin/apache-tomcat-10.1.20.tar.gz

4. Install it to the TOMCAT_HOME directory like "/opt/tomcat":

herong$ tar -xzf apache-tomcat-10.1.20.tar.gz 
herong$ sudo mv apache-tomcat-10.1.20 $TOMCAT_HOME

4. Verify the installation:

herong$ sudo $TOMCAT_HOME/bin/catalina.sh version 

Using CATALINA_BASE:   /opt/tomcat
Using CATALINA_HOME:   /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /opt/tomcat/bin/bootstrap.jar
                       :/opt/tomcat/bin/tomcat-juli.jar
Using CATALINA_OPTS:   
Server version: Apache Tomcat/10.1.20
Server built:   Mar 19 2024 12:49:58 UTC
Server number:  10.1.20.0
OS Name:        Linux
OS Version:     4.18.0-193.el8.x86_64
Architecture:   amd64
JVM Version:    17.0.1+12-LTS
JVM Vendor:     Red Hat, Inc.

Cool. I have installed Apache Tomcat on my CentOS computer!

Table of Contents

 About This Book

 Introduction to Linux Systems

 Process Management

 Files and Directories

 Running Apache HTTP Server (httpd) on Linux Systems

Running Apache Tomcat on Linux Systems

 What Is Apache Tomcat

Install Apache Tomcat on Linux

 Start/Stop Apache Tomcat

 Common Issues on Running Tomcat

 Turn on SSL/TLS Support on Tomcat

 SSL/TLS Support on Tomcat 8 or Older

 Running PHP Scripts on Linux Systems

 Running MySQL Database Server on Linux Systems

 Running Python Scripts on Linux Systems

 Conda - Environment and Package Manager

 GCC - C/C++ Compiler

 OpenJDK - Open-Source JDK

 Graphics Environments on Linux

 SquirrelMail - Webmail in PHP

 Tools and Utilities

 References

 Full Version in PDF/EPUB