How To Install Tomcat 8.5 on windows

Published: August 24, 2018 (Updated: Aug 24, 2018)

Enjoying this content? Subscribe to the Channel!

Mastering Tomcat: A Step-by-Step Guide to Installing Apache Tomcat 8 on Windows (Server & 10)

Hello, tech fans, and welcome back to Darren’s Tech Tutorials!

If you’re looking to run Java applications or web services, Apache Tomcat is the indispensable tool you need. It’s a robust, open-source application server that handles the heavy lifting, allowing your servlets and JSPs to shine.

In this comprehensive guide, we’re walking through the precise steps to install Apache Tomcat 8 on a Windows environment. Whether you are using Windows Server 2016, Windows 10, or a similar modern Windows OS, these instructions will ensure a smooth, professional installation. By the end of this tutorial, Tomcat will be set up as a persistent Windows service—ready to handle your web traffic!

Let’s dive in!


Prerequisite Check: Setting the Stage for Tomcat

Before we begin downloading Tomcat, it is absolutely essential that your system meets two key requirements. Tomcat requires a properly configured Java Development Kit (JDK) to run.

You must have the following installed and configured:

  1. Java JDK Installed: If you haven’t installed the JDK yet, follow our step-by-step video guide: How to install JDK on Windows
  2. JAVA_HOME Environment Variable Set: Tomcat relies on this environment variable to locate your Java installation. If this is not set correctly, the installation will fail! Learn how to set it here: How to Set Java Home on Windows

Once your Java environment is confirmed, you are ready for the Tomcat installation!


Step 1: Downloading the Apache Tomcat Distribution

We will be downloading the core ZIP distribution, as this gives us maximum control over the installation location and service configuration.

  1. Navigate to the Apache Tomcat Website: Visit the official Apache Tomcat website (or search for “Apache Tomcat 8 download”).
  2. Locate the Core Distribution: Find the link for Tomcat 8.x. Look for the “Core” section.
  3. Download the ZIP File: Click on the link for the 32-bit/64-bit Windows zip file. This package contains everything we need to run Tomcat and install it as a service.
  4. Save the downloaded file to a temporary location.

Step 2: Unzipping and Setting the Tomcat Directory

For best practices, we recommend installing Tomcat in a stable, easily accessible location, like the root of your C drive.

  1. Extract the Files: Right-click the downloaded ZIP file and extract all contents.
  2. Rename and Move the Folder: Rename the extracted folder (it might be named something like apache-tomcat-8.5.x) to a simpler name, such as Tomcat8.
  3. Relocate: Move this newly renamed Tomcat8 folder to a definitive location, such as C:\Tomcat8.
    • Pro Tip: Installing it here makes paths much easier to manage later on!

Step 3: Installing Tomcat as a Windows Service

This is the most critical step. Installing Tomcat as a service ensures that it starts automatically when your server boots up and runs reliably in the background, even if you log out.

We will use the command-line utility provided within the Tomcat binary files to complete this process.

  1. Open Command Prompt as Administrator: Click the Windows Start Menu, search for “CMD,” right-click the result, and select “Run as administrator.”

  2. Navigate to the Tomcat Bin Directory: Change directory to where your Tomcat service configuration files reside. Assuming you followed Step 2:

    cd C:\Tomcat8\bin
    
  3. Execute the Service Installation Command: With the command prompt positioned in the bin directory, run the following command:

    service install Tomcat8
    
    • (Note: The name ‘Tomcat8’ can be customized, but it’s best to keep it descriptive.)

You should receive a confirmation message indicating that the service was successfully installed.

Step 4: Starting the Tomcat Service

Now that the service is registered with Windows, we need to manually start it for the first time.

  1. Open Windows Services Manager: You can do this by pressing Windows Key + R, typing services.msc, and pressing Enter.
  2. Locate the Service: Scroll down until you find the service named Tomcat8 (or whatever name you used in the previous step).
  3. Start the Service: Right-click the Tomcat8 service entry and select Start.
    • Optional: Double-click the service to open its properties, and verify that the “Startup type” is set to “Automatic.”

Step 5: Testing the Installation

The final step is the most rewarding: confirming that Tomcat is running correctly and serving web pages!

Tomcat defaults to running on port 8080.

  1. Open Your Web Browser: Open Chrome, Firefox, or Edge.

  2. Navigate to the Localhost Port: In the address bar, type the following address and press Enter:

    http://localhost:8080
    

If everything was configured correctly (especially JAVA_HOME), you will be greeted with the famous Apache Tomcat default homepage—a big congratulations on your successful installation!


Conclusion: You Are Ready to Deploy!

You have successfully downloaded, configured, and installed Apache Tomcat 8 as a robust service on your Windows system. This setup provides a stable, reliable foundation for developing and deploying Java-based web applications.

Need to review the steps? Check out the full text tutorial on my website here: https://darrenoneill.eu/?p=700

If you found this guide helpful, please be sure to like this post and subscribe to Darren’s Tech Tutorials for more clear, actionable guides!

Level Up Your Command Line Skills!

Don’t forget to grab your Free Linux Cheat Sheet to keep your command-line skills sharp across all environments: http://eepurl.com/dkRNM9