To install Apache Tomcat 9 on Red Hat Enterprise Linux (RHEL) 7, you must first ensure your system has a Java Runtime Environment (JRE) or Java Development Kit (JDK) version 8 or higher installed. Since RHEL 7's default repositories often carry older versions, many administrators prefer downloading the binary distribution directly from the Apache Tomcat official website to ensure they have the latest security patches. Step 1: Install Java (JDK)
Navigate to the Apache Tomcat 9 Download Page to find the latest "Binary Distribution" in tar.gz format. You can download it directly to your server using wget : cd /tmp wget https://apache.org Use code with caution. apache tomcat 9 download for rhel 7
(Note: Replace 9.0.x with the current version number, such as 9.0.98) . Step 4: Install and Extract Apache Tomcat 9 Software Downloads To install Apache Tomcat 9 on Red Hat
For security reasons, never run Tomcat as the root user. Create a dedicated system user and group: sudo useradd -r -m -U -d /opt/tomcat -s /bin/false tomcat Use code with caution. Step 3: Download Apache Tomcat 9 You can download it directly to your server
Tomcat 9 requires Java 8 or later. You can install OpenJDK 11, which is highly recommended for RHEL 7 environments, using the yum package manager: sudo yum install java-11-openjdk-devel -y Use code with caution.
Verify the installation by running java -version to confirm the version is at least 1.8.0. Step 2: Create a Dedicated Tomcat User