Idea deploys web project to Linux server

One: clean, install generates war package

pom sets the packaging format war

<artifactId>web</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>war</packaging>
    <name>web</name>
    <description>web</description>

Execute the maven packaging command:

clean package

Packaged
Insert picture description here

Two: Enter Linux:

1): Stop Tomcat service: ps -ef|grep tomcat find the pid of tomcat, kill -9 pid, and kill the tomcat process. Or enter the bin directory of the tomcat installation path./shutdown.sh to stop tomcat

2): Enter the webapp directory under the tomcat installation directory to delete the war package and the decompressed files of the previously run project

Note: If it is the first deployment, the first two steps do not need to be executed

3): Upload war to the webapp directory under the tomcat installation directory

4): Start tomcat: enter the bin directory of the tomcat installation directory: ./startup.sh

Three: View the log generated by the project:

View catalina.out in the logs directory under the tomcat installation directory

Command: tail -f catalina.out

Attachment: tomcat installation under linux

https://blog.csdn.net/weixin_41781654/article/details/111310134

https://blog.csdn.net/a_18397219871/article/details/79466392

Guess you like

Origin blog.csdn.net/weixin_41003771/article/details/115370913