Publish the java project to the Linux environment

Simple process steps for publishing java project to Linux environment:

1: Open the idea project. Find maven on the right, there are projects that need to be packaged, determine the projects that need to be released,

Open Lifecycle and select package. Click: package

If the package report version number is incorrect, select the small tool shown in the upper right corner

Open, select the installed version of jdk.

Step 2: After the packaging is complete, find the packaged folder:

Open the folder to find the corresponding item:

Click show in Explorer

Copy the jar package to the Liunx server, all other folders do not need to be managed,

(Upload to Linux server through xftp tool)

Step 3: Find the folder after uploading: use the xshell tool

Three ways to start the service:

1: This command is not recommended. It is enabled by the console, and the service cannot be used after the console is closed, so it is recommended to use the second command:

java -jar eureka-demo-0.0.1-SNAPSHOT.jar --console start

2: Use this command to enable better 

nohup java -jar eureka-demo-0.0.1-SNAPSHOT.jar & - background startup

3: Start with docker

 

 

 

 

Guess you like

Origin blog.csdn.net/xulong5000/article/details/113773476