Skip to content

Installing Apache Tomcat

Apache Tomcat is a popular and reliable open‑source web server that specializes in running Java applications. On ruachost.com, you can install Tomcat to host Java Servlets, JavaServer Pages (JSP), and WebSocket applications.

  • Lightweight and stable Java HTTP web server.
  • Supports Servlets, JSP, and WebSockets.
  • Backed by a large online support community.
  • Ideal for local development and production environments.

Step 1: Install Java Development Kit (JDK)

Section titled “Step 1: Install Java Development Kit (JDK)”

Tomcat requires Java. Ensure the JDK is installed:

Terminal window
sudo apt update
sudo apt install default-jdk

Verify installation:

Terminal window
java -version
  1. Navigate to the Apache Tomcat official site.
  2. Select the version you want to install.
  3. Download the Windows Service Installer (for Windows) or the tar.gz/zip package (for Linux/macOS).
    1. Run the installer.
    2. Select components (Start Menu Items, Manager, Host Manager).
    3. Configure service name and shutdown port.
    4. Provide the JDK installation path.
    1. Extract the archive:

      Terminal window
      tar xzvf apache-tomcat-10.x.xx.tar.gz
    2. Move it to /opt/tomcat:

      Terminal window
      sudo mv apache-tomcat-10.x.xx /opt/tomcat

Add Tomcat environment variables to your shell profile:

Terminal window
export CATALINA_HOME=/opt/tomcat
  • On Linux/macOS:

    Terminal window
    $CATALINA_HOME/bin/startup.sh
  • On Windows: Tomcat runs as a service; start it from Services or the Monitor Tomcat tool.

Open a browser and go to:

http://localhost:8080/

You should see the Tomcat welcome page.