DropVPS Team
Writer: Cooper Reagan
How to install Apache Tomcat on Centos 8

Table of Contents
What you will read?
Apache Tomcat is a widely used open-source Java Servlet container that allows you to run Java web applications. Installing it on CentOS 8 enables you to deploy and manage Java-based projects easily.
Step 1: Update System Packages
sudo dnf update -y
Step 2: Install Java
Tomcat requires Java. Install OpenJDK 17:
sudo dnf install java-17-openjdk-devel -y
Verify Java installation:
java -version
Step 3: Download Apache Tomcat
Navigate to /opt and download the latest Tomcat 10 version:
cd /opt
sudo wget https://downloads.apache.org/tomcat/tomcat-10/v10.2.0/bin/apache-tomcat-10.2.0.tar.gz
Extract the archive:
sudo tar xzf apache-tomcat-10.2.0.tar.gz
Rename the folder for simplicity:
sudo mv apache-tomcat-10.2.0 tomcat
Step 4: Set Permissions
Make the Tomcat scripts executable:
cd /opt/tomcat/bin
sudo chmod +x *.sh
Step 5: Start Tomcat
Run the startup script:
sudo ./startup.sh
Verify Tomcat is running by opening:
http://localhost:8080
You should see the Tomcat welcome page. Apache Tomcat is now installed and running on CentOS 8. Deploy your Java web applications by placing them in the /opt/tomcat/webapps directory.
U
Loading...