1.购买虚拟机安装好jdk,tomcat,mysql后,项目打包成war包放到tomcat的webapps下
2.配置tomcat -- server.xml
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
URIEncoding="UTF-8"
redirectPort="8443" />
Centos配置:
<Context path="/" docBase="/home/java/apache-tomcat-8.5.51/webapps/JXC" debug="0" reloadable="true" />
Windows配置:
<Context path="/" docBase="E:\java\apache-tomcat-8.0.44\webapps\JXC" debug="0" reloadable="true" />
3.启动tomcat
/home/java/apache-tomcat-8.5.51/bin/startup.sh 启动命令
/home/java/apache-tomcat-8.5.51/bin/shutdown.sh 关闭命令