4.2 mv jdk-8u172-linux-x64 /usr/local/jdk
4.3 vim /etc/profile # Edit system configuration Write the following
export JAVA_HOME=/usr/java/jdk
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
export JAVA_HOME CLASSPATH PATH
Then wq save and exit
4.4 source /etc/profile #Reload system files
5 Install tomcat
5.1 Compress and upload apache-tomcat-8.5.28.tar.gz to the Linux server using the previously configured ftp
5.2 tar -zxvf apache-tomcat-8.5.28.tar.gz #decompress
5.3 mv apache-tomcat-8.5.28 /usr/local/tomcat8 #Move the file to the /usr/local/ directory and rename it to Tomcat8
5.4 It is better to change the port but backup the basic configuration file server.xml before changing the port
5.5 cat /usr/local/conf/server.xml>tomatserver.xml #Backup server.xml file
5.5 vim /usr/loacl/conf/server.xml Modify the following content
<Connector port="8081" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8444" />
I have changed port 8080 to port 8081 to prevent other applications in the system from occupying port 8080
Finally enter the bin directory
./ startup.sh #Start the server The following is the information about the successful startup of tomat
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr/java/jdk1.8.0_161
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Tomcat started.
6 Enter the ip of your service on the browser: 8081 to access the welcome page of tomcat appears, indicating that the configuration is successful
7 Pack your project into xxx.war, upload it to the server with ftp, then move mv to /usr/local/tomcat8/webapps. This file can automatically parse your project and then assign your sql file to mysql in the database
8 Then enter ip:8081/project name in the browser to access your own project