table of Contents
Two, configure environment variables
Three, install Tomcat9 service items
Fourth, start the Tomcat9 service
1. Official website download
Official website link: http://tomcat.apache.org/
1. Select tomact9 under Download on the left (the editor downloaded tomact9) as shown in the figure below:
2. Pull down the content and select the format to download, (the editor chooses the 64-bit green version) as shown in the figure below:
3. After the download is complete, unzip it and unzip it to a custom location!
Two, configure environment variables
1. In the'System Variables', create a new TOMCAT_HOME, if it already exists, click Edit. As shown in the figure below:
The variable value is the decompressed path, and you can find it by browsing the record query:
2. In the'System Variables', create a new CATALINA_HOME, if it already exists, click Edit. As shown in the figure below:
The variable value is the decompressed path, and you can find it by browsing the record query:
3. Add %CATALINA_HOME%\bin in the PATH, as shown in the following figure:
4. Add %CATALINA_HOME%\lib\servlet-api.jar in CLASSPath (Note: there is no semicolon after it), as shown in the figure below:
Note: If you cannot find the CLASSPath variable in the system variables, you can manually add one:
Three, install Tomcat9 service items
Click "Start"-"Run", enter "cmd", and enter service install Tomcat9 in the console.
Install Tomcat9 service items in the system
Fourth, start the Tomcat9 service
Click Start, search for services or enter Control Panel—System and Security—Administrative Tools—Services, find the Apache Tomcat Tomcat9 service item, right-click the item, and click "Start" to start the service
After startup
Finally open the browser, enter http://localhost:8080 or http://127.0.0.1:8080 in the address bar
If the tomcat sample homepage appears, it means that the server is installed successfully