Set it to jar here.
According to my experience, packaging into war is a pitfall and requires Tomcat, and you will encounter many problems when deploying for the first time.
If you package it into a jar, you don’t need to install Tomcat. You can start the project with just one command: java -jar codergroup-1.0.0-SNAPSHOT.jar.
I use IntelliJ IDEA here, directly in the Maven plug-in, click package to package.
Then you can see it in the target of the project
Upload the jar file to the server
In order to facilitate the management of project files and maintenance pressure, I chose to install the Pagoda panel here
Install MySQL5.5## directly in the Pagoda panel
#Then import the databaseSo the process of installing MySQL is not introduced hereAbout the use of the Pagoda panel: refer hereThe installation of JDK only requires one line of commands and no need Configure environment variablesyum -y install java-1.8.0-openjdk*4. Start the projectWe know that the command to start the jar project is the java -jar jar file NameBut this kind of startup is a foreground startup, that is, when the command line window is closed, the project will be closed. So we need to start in the background, the command is nohup java -jar codergroup-1.0.0-SNAPSHOT.jar >temp.txt & Explain: nohup runs without hanging up>temp.txt writes the output in the command line to temp.text& Automatically runWe view the content in temp.txt, projectThe above is the detailed content of How to deploy SpringBoot project to cloud server. For more information, please follow other related articles on the PHP Chinese website!