Tomcat download and configure environment variables

1. Confirm whether JDK is installed and the JDK version

1. Press the windows+R keys to open the run window, enter cmd, and click OK to enter the command line window.

2. Enter java in the DOS window and press Enter. If the following picture appears, it means it has been installed.

3. Enter java -version and press Enter to view the java version.

My JDK version is 17, and Tomcat can run normally under this version.

4. If Tomcat cannot run under other versions of JDK, you can go to the official website to download JDK17. For tutorials on installation and configuration of environment variables, refer to: Download and installation of JDK and JRE And configure JDK environment variables_Eileennnnnn's blog-CSDN blog

The location for downloading JDK17 from the official website is as shown below:Java Downloads | Oracle

2. Tomcat official download

1. Open the official download page:Apache Tomcat® - Welcome! 

Choose a version, I chose Tomcat 9.

2. Select 64-bit download.

3. After downloading, it is a ZIP compressed package. Unzip the compressed package.

Remember the path after Tomcat is decompressed. Mine is D:\Tomcat\apache-tomcat-9.0.80-windows-x64\apache-tomcat-9.0.80

3. Configure environment variables

1. Right-click this computer - Properties, click "Advanced system settings".

2. Click Environment Variables.

3. Click New in the System Variables column.

4. Create a new system variable, the variable name is CATALINA_HOME, the variable value is the Tomcat installation directory, and then click OK.

My value is: D:\Tomcat\apache-tomcat-9.0.80-windows-x64\apache-tomcat-9.0.80

5. Find Path in the system variables and click Edit.

6. Click New, enter %CATALINA_HOME%\bin, and click OK.

7. Click OK - OK to exit.

4. Verify whether the Tomcat configuration is successful

1. Press the windows+R keys to open the run window, enter cmd, and click OK to enter the command line window.

2. Enter startup.bat in the DOS window and press Enter.

3. The Tomcat startup window will appear, indicating that the configuration is successful.

4. Open the browser and enter http://localhost:8080/ as the address. Do not close the Tomcat startup window, otherwise the page cannot be opened.

5. If the following picture appears, it means the configuration is successful.

Guess you like

Origin blog.csdn.net/Eileennnnnn/article/details/132814043