1. Download the corresponding JDK and tomcat versions
JDK:jdk-8u131-windows-x64
tomcat:apache-tomcat-8.5.23-windows-x64.zip
Second, the installation of JDK
Please refer to:
Three, tomcat installation
Step 1: Download apache-tomcat-8.5.23-windows-x64.zip from the official website, download address: https://tomcat.apache.org/whichversion.html
Step 2: Press the downloaded file to the specified directory (here I installed it on the C drive), and change the name to tomcat, as shown below:
Step 3: Configure Tomcat environment variables
Computer → Properties → Advanced System Settings → Advanced → Environment Variables
Add the following variables in system variables
1) Create a new TOMCAT_HOME variable
variable name TOMCAT_HOME
The variable value is C:\Program Files\tomcat (the variable value is the tomcat decompression path we downloaded, here is c:\tomcat)
2) Create a new CATALINA_HOME variable
Variable name CATALINA_HOME
Variable value C:\Program Files\tomcat
Yes, the variable value of CATALINA_HOME is the same as the variable value of TOMCAT_HOME.
3) Modify the variable Path
Find the Path variable name in the system variables, double-click or click to edit, and add the following at the end
;%TOMCAT_HOME%\bin;%CATALINA_HOME%\lib
It should be noted here that each variable value must be separated by ;.
4) Start the Tomcat server
Enter startup and press Enter in the cmd command window, and run as shown in the following figure
Step 4: Test whether the Tomcat server is successfully installed
Enter http://localhost:8080 or http://127.0.0.1:8080 in your browser
The installation will be successful as shown below
Open the Tomcat installation directory configuration file directory: D:\apache-tomcat-7.0.65\conf\server.xml
<Connector URIEncoding="UTF-8" port="8080" protocol="HTTP/1.1"
connectionTimeout="60000"
redirectPort="8443" useBodyEncodingForURI="true"/>
If you deploy the project by default in eclipse, you will find that the published project cannot be found in the webapps directory of Tomcat, but in the workspace directory of eclipse
D:\Workspaces\eclipse_luna\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps
Modify the publish properties of Tomcat in eclipse. Double-click [Tomcat v7.0 Server at localhost-1]---[Server Locations]---Select the project deployment path---[Deploy path]--Set the folder for project deployment