Tomcat download, installation and configuration graphic tutorial (2023 latest version)

Table of contents

1. Download

2. Configure environment variables

3. Verify whether the configuration is successful


1. Download

Official website address: https://tomcat.apache.org/

I choose Tomcat9.0 version here, you can choose the version you need

 64-bit, Windows system, click to download

2. Configure environment variables

1.  Unzip the downloaded file.

2. Right-click "This PC", select "Properties", select "Advanced", click "Environment Variables"

 

 3. Click New

4. The variable name is CATALINA_HOME, and the variable value is the decompressed path

 5. Find Path in the system variables, click Edit, and click New in the interface for editing environment variables.

6. Enter %CATALINA_HOME%\bin and click OK.

7. Click OK again to confirm. The configuration is complete.

3. Verify whether the configuration is successful

1. Two ways

(1) Win+R, enter cmd and press Enter, then enter startup.bat on the command prompt interface, and press Enter.

(2) Double-click startup.bat directly in the decompressed file to open it.

The following interface appears, indicating that the configuration failed .

 According to this prompt, it should be caused by the lack of both JAVA_HOME and JRE_HOME variables in the environment variable

2. Click New

Variable name: CATALINA_Base

Variable value: Click to browse the directory and find the root directory of tomcat9

Variable name: CATALINA_HOME

Variable value: Click to browse the directory and find the root directory of tomcat9

Variable name: JAVA_HOME

Variable value: find the installation path of jdk

Variable name: JRE_HOME

Variable value: find the installation path of jre

Add %JAVA_HOME%\bin and %JAVA_HOME%\jre\bin variables  to Path .

 Enter startup.bat again, the result is as shown in the figure below, and the Tomcat window appears.

 The Tomcat window appears to indicate that the configuration is successful .

 3. Open the browser and enter http://localhost:8080/, the Tomcat just now cannot be closed. The result is as shown in the figure below, and the Tomcat access is successful.

 to here. The download, installation, and configuration of Tomcat are complete!

Guess you like

Origin blog.csdn.net/qq_63195700/article/details/129213847