Linux Springboot jar package startup method

1. Start command

  命令行:nohup java -jar xxx.jar --spring.profiles.active=dev/test/prod > catalina.out 2>&1 &

  Parameter explanation: A. xxx.jar represents the complete jar package name;

       B. --spring.profiles.active = dev / test / prod is deployed according to different environments;

       C. catalina.out refers to the name of the output log file;

       D. 2> & 1 means to output all log files;

       E. & stands for background start, means ctrl + c will not exit the program;

 

2. Stop command

  Command line: kill -9 pid

  Parameter explanation: kill is used to delete the executing program;

       9 represents the mandatory deletion procedure;

       pid stands for process number;

 

3. Start script

4. Stop the script

 

Reference: https://blog.csdn.net/Mrqiang9001/article/details/91601577

Guess you like

Origin www.cnblogs.com/ruhuanxingyun/p/12730162.html