In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Recently, I have been studying the deployment of the springboot project to the Linux server, and because springboot is embedded with tomcat, the project can be packaged and uploaded directly to the server.
1. Add springboot's maven plug-in to the pom file.
Org.springframework.boot spring-boot-maven-plugin
2. Execute the maven command to generate the jar package
Before performing this step, you must make sure that the environment of maven is configured. The process of environment configuration of maven is as follows
a. Add a MAVEN_HOME environment variable to the system environment variable, followed by your local maven path
b. Add% MAVEN_HOME%\ bin to PATH
c. Execute maven-v in the DOS command to see if the environment is correct
To ensure that the environment of maven is configured, execute mvn clean install-Dmaven.test.skip=true in the Terminal window
You can see
Now that the package has been successfully packed, you can see an extra target package in the project structure. The packaged jar package is below.
3. Upload the jar package to the Linux server
a. Execute the # sudo yum install lrzsz-y command
This command will install a software that can be downloaded and uploaded
b. Execute the # rz command
This is the upload command. After execution, select the file and upload it.
4. Execute the # nohup java-jar demo-0.0.1-SNAPSHOT.jar & command
Execute this command and the background can start the jar package.
After completing these 4 steps, you can access it on the server? Ip+ port
Summary
The above is the method and steps of deploying springboot project under Linux introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply you in time. Thank you very much for your support to the website!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.