0% found this document useful (0 votes)
23 views5 pages

ORACLE-BASE - Apache Tomcat 10 Installation On Linux (RHEL and Clones)

This document provides a detailed guide for manually installing Apache Tomcat 10 on RHEL and its clones, as it is not available in standard distributions. It covers the necessary downloads, installation steps, configuration, and management access setup, along with instructions for deploying applications and upgrading Java and Tomcat. Key commands and directory structures are outlined to facilitate the installation process.

Uploaded by

sharp wahbani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views5 pages

ORACLE-BASE - Apache Tomcat 10 Installation On Linux (RHEL and Clones)

This document provides a detailed guide for manually installing Apache Tomcat 10 on RHEL and its clones, as it is not available in standard distributions. It covers the necessary downloads, installation steps, configuration, and management access setup, along with instructions for deploying applications and upgrading Java and Tomcat. Key commands and directory structures are outlined to facilitate the installation process.

Uploaded by

sharp wahbani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

4/11/25, 11:46 PM ORACLE-BASE - Apache Tomcat 10 Installation on Linux (RHEL and clones)

8i | 9i | 10g | 11g | 12c | 13c | 18c | 19c | 21c | 23ai | 24ai | Misc | PL/SQL | SQL | RAC | WebLogic |
Linux 
Home » Articles » Linux » Here

Apache Tomcat 10 Installation on Linux (RHEL and clones)


Apache Tomcat 10 is not available from the standard RHEL distributions, so this article provides
information about the manual installation and basic configuration of Apache Tomcat 10 on RHEL
and its clones from tarballs. The tarball approach to installation is largely unchanged compared to
previous tomcat versions.

Downloads
Installation
Checking the Status of Tomcat
Configuration Files
Enabling HTML Management Access
Deploying Applications
Java and Tomcat Upgrades

Related articles.

Apache Tomcat 8 Installation on Linux (RHEL and clones)


Apache Tomcat 9 Installation on Linux (RHEL and clones)
Apache Tomcat : Enable HTTPS

Downloads
Download the following software. This article assumes these downloads are present in the "/tmp"
directory on the server.

OpenJDK 11 Downloads (I used OpenJDK11U-jdk_x64_linux_hotspot_11.0.11_9.tar.gz)


Apache Tomcat (I used apache-tomcat-10.0.6.tar.gz)

Installation
Create a user called "tomcat" to own the Tomcat installation. We also create a directory called
"/u01" to hold all the config, and make sure that it owned by the new "tomcat" user.

# useradd tomcat
# mkdir -p /u01
# chown tomcat:tomcat /u01

https://oracle-base.com/articles/linux/apache-tomcat-10-installation-on-linux 1/5
4/11/25, 11:46 PM ORACLE-BASE - Apache Tomcat 10 Installation on Linux (RHEL and clones)

Install the JDK from the tarball under the "/u01/java" directory. We unzip it to create a new
directory, which includes the version number, but use a symbolic link so we can always use the
same path for the JAVA_HOME environment variable, regardless of the version.

# su - tomcat
$ mkdir -p /u01/java
$ cd /u01/java
$ tar xzf OpenJDK11U-jdk_x64_linux_hotspot_11.0.11_9.tar.gz
$ ln -s jdk-11.0.11+9 latest

Install Tomcat from the tarball under the "/u01/tomcat" directory. We unzip it to create a new
directory, which includes the version number, but use a symbolic link so we can always use the
same path for the CATALINA_HOME environment variable, regardless of the version.

$ mkdir -p /u01/tomcat
$ cd /u01/tomcat
$ tar xzf /tmp/apache-tomcat-10.0.6.tar.gz
$ ln -s apache-tomcat-10.0.6 latest

We want to separate the config from the binaries, to make future upgrades easier, so we will
create a new directory to act as the CATALINA_BASE location, and seed it by copying the relevant
directories to the new directory. We are using a sub-directory called "instance1" to allow for
multiple instances, but that is not necessary if you only plan to have a single Tomcat instance
running.

$ mkdir -p /u01/config/instance1
$ cp -r /u01/tomcat/latest/conf /u01/config/instance1/
$ cp -r /u01/tomcat/latest/logs /u01/config/instance1/
$ cp -r /u01/tomcat/latest/temp /u01/config/instance1/
$ cp -r /u01/tomcat/latest/webapps /u01/config/instance1/
$ cp -r /u01/tomcat/latest/work /u01/config/instance1/

Set the following environment variables and append them to the "/home/tomcat/.bash_profile" so
they are set for subsequent logins.

export JAVA_HOME=/u01/java/latest
export CATALINA_HOME=/u01/tomcat/latest
export CATALINA_BASE=/u01/config/instance1

Start and stop Tomcat using the following scripts.

$ $CATALINA_HOME/bin/startup.sh
$ $CATALINA_HOME/bin/shutdown.sh

https://oracle-base.com/articles/linux/apache-tomcat-10-installation-on-linux 2/5
4/11/25, 11:46 PM ORACLE-BASE - Apache Tomcat 10 Installation on Linux (RHEL and clones)

The Tomcat logs are written to the "$CATALINA_BASE/logs/" directory by default.

Once Tomcat is started, the following URL should be available. Configuration for the management
URLs is discussed below.

http://localhost:8080/
http://localhost:8080/manager/html
http://localhost:8080/manager/status

Remember to open up the port on the firewall if you want to access the site from other servers on
the network. Information about the Linux firewall is available here.

Checking the Status of Tomcat


There are several ways to check the status of the service.

$ netstat -nlp | grep 8080


(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp6 0 0 :::8080 :::* LISTEN 6349/java
$

 ps -ef | grep tomcat


$
oracle 6349 1 0 16:09 pts/0 00:00:29 /u01/java/latest/bin/java -Djava.util

tomcat 16919 3994 0 14:20 pts/1 00:00:00 grep --color=auto tomcat


$

$ curl -I http://localhost:8080
HTTP/1.1 200
Content-Type: text/html;charset=UTF-8
Transfer-Encoding: chunked
Date: Fri, 04 Jun 2021 20:19:38 GMT

 

The status is also available from the HTML management page.

Configuration Files
The main locations of configuration and log information are shown below.

Release Notes : $CATALINA_HOME


Bin Directory : $CATALINA_HOME/bin
Config : $CATALINA_BASE/conf
Webapps : $CATALINA_BASE/webapps
Logs : $CATALINA_BASE/logs

https://oracle-base.com/articles/linux/apache-tomcat-10-installation-on-linux 3/5
4/11/25, 11:46 PM ORACLE-BASE - Apache Tomcat 10 Installation on Linux (RHEL and clones)

Enabling HTML Management Access


Edit the "$CATALINA_BASE/conf/tomcat-users.xml" file, adding the following entries inside
"tomcat-users" tag. Adjust the password as required.

<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user username="tomcat" password="MyPassw0rd!" roles="manager-gui,admin-gui"/>

Restart Tomcat for the configuration to take effect.

$ $CATALINA_HOME/bin/shutdown.sh
$ $CATALINA_HOME/bin/startup.sh

The management application is now available from the " http://localhost:8080/manager/html" URL.

Deploying Applications
You can get a sample application WAR file to test with from "http://tomcat.apache.org/tomcat-
10.0-doc/appdev/sample/".

If this is a redeployment, delete the existing deployment from the "$CATALINA_BASE/webapps"


directory.

# rm -Rf $CATALINA_BASE/webapps/sample

Place the "sample.war" file in the "$CATALINA_BASE/webapps" directory and Tomcat with
automatically deploy it. You will see a "sample" directory appear.

You don't need to stop and start Tomcat for this to work, but you can if you want.

$ $CATALINA_HOME/bin/shutdown.sh
$ $CATALINA_HOME/bin/startup.sh

Java and Tomcat Upgrades


To upgrade, we just need to stop Tomcat, unzip the new software, alter the symbolic links and start
Tomcat again.

In the following example shows how you would do this, but clearly you would have to alter the
version numbers.

$CATALINA_HOME/bin/shutdown.sh

cd /u01/java
tar xzf OpenJDK11U-jdk_x64_linux_hotspot_11.0.11_9.tar.gz

https://oracle-base.com/articles/linux/apache-tomcat-10-installation-on-linux 4/5
4/11/25, 11:46 PM ORACLE-BASE - Apache Tomcat 10 Installation on Linux (RHEL and clones)

rm latest
ln -s jdk-11.0.11+9 latest

cd /u01/tomcat tar xzf /tmp/apache-tomcat-9.0.46.tar.gz rm latest ln -s apache-tomcat-9.0.46


latest $CATALINA_HOME/bin/startup.sh # Tail the log file to watch the startup. tail -f
$CATALINA_BASE/logs/catalina.out
For more information see:

Apache Tomcat
Apache Tomcat 8 Installation on Linux (RHEL and clones)
Apache Tomcat 9 Installation on Linux (RHEL and clones)
Apache Tomcat : Enable HTTPS

Hope this helps. Regards Tim...

Back to the Top.

Created: 2021-06-04 Updated: 2021-06-04

Contact Us


Home | Articles | Scripts | Blog | Certification | Videos | Misc | About

About Tim Hall


Copyright & Disclaimer

https://oracle-base.com/articles/linux/apache-tomcat-10-installation-on-linux 5/5

You might also like