Loading...

How to Install Apache Tomcat on CentOS 8

Simple.Predictable.Scalable

Easily deploy your favorite applications in seconds at an unbeatable price for your next projects.

Installing Apache Tomcat on CentOS 8

Apache Tomcat is an open-source web server and Java servlet container that is used to deploy and run Java web applications. It provides support for Java Servlet, JavaServer Pages (JSP), WebSocket, and other Java EE technologies.

Here are the steps to install Apache Tomcat on CentOS 8:

  1. Update your system by running the following command:
    sudo dnf update
  2. Install Java Development Kit (JDK) by executing the command:
    sudo dnf install java-1.8.0-openjdk-devel
  3. Download the latest version of Apache Tomcat from the official website using the following command:
    wget https://downloads.apache.org/tomcat/tomcat-x.y.z.tar.gz
  4. Extract the downloaded archive by running the command:
    tar -xf tomcat-x.y.z.tar.gz
  5. Move the extracted folder to /opt directory:
    sudo mv tomcat-x.y.z /opt/
  6. Set up environment variables by creating a new file tomcat.sh in the /etc/profile.d/ directory with the following content:
    export CATALINA_HOME="/opt/tomcat-x.y.z"
    export JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk"
    export JRE_HOME="/usr/lib/jvm/java-1.8.0-openjdk/jre"
    export PATH="$PATH:$JAVA_HOME/bin:$CATALINA_HOME/bin"
  7. Make the tomcat.sh script executable using the command:
    sudo chmod +x /etc/profile.d/tomcat.sh
  8. Reload the environment variables by executing:
    source /etc/profile.d/tomcat.sh
  9. Start Apache Tomcat by running the command:
    sudo systemctl start tomcat
  10. To enable Apache Tomcat to start automatically at boot time, execute:
    sudo systemctl enable tomcat

You have successfully installed Apache Tomcat on CentOS 8!

Refer A Friend
Get $25

Installing Apache Tomcat
CentOS 8 installation guide
Apache Tomcat installation step by step
Tomcat installation on CentOS 8
How to install Apache Tomcat on CentOS 8
Installing Tomcat on CentOS 8
CentOS 8 Apache Tomcat setup
Tomcat installation guide for CentOS 8
Steps to install Tomcat on CentOS 8
CentOS 8 Tomcat installation procedure

Why Customers Love Us

What our customers say about us

Ready To Get Started For Free?

Create your free account today.