1、将压缩版 tomcat 解压;
2、编辑 startup.bat 文件,在第一行加入:
SET JAVA_HOME=C:\Java\jdk1.8.0_131 SET CATALINA_HOME=C:\Users\User\Desktop\project-tomcat\apache-tomcat-8.5.16
3、修改 server.xml 文件,有 3 处地方修改:
<!-- <Server port="8005" shutdown="SHUTDOWN"> --> <Server port="8006" shutdown="SHUTDOWN">
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
<!-- <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /> --> <Connector port="8010" protocol="AJP/1.3" redirectPort="8443" />