Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to deploy springboot project under Linux

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

In this article, the editor introduces in detail "how to deploy the springboot project under Linux", the content is detailed, the steps are clear, and the details are handled properly. I hope this article "how to deploy the springboot project under Linux" can help you solve your doubts.

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

After reading this, the article "how to deploy springboot projects under Linux" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself. If you want to know more about related articles, welcome to follow the industry information channel.

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report