业余时间记录下发布到服务器

it2023-02-28  83

上传到项目后

首先到项目路径下,通过cd

然后查看当前运行项目

jps -l

然后看到自己项目的进程,结束他

kill -9 4201

然后写一个启动命令start.sh 

#!/bin/bash # nohup java -jar p.jar --spring.profiles.active=uat & tail -f nohup.out jarname=`ls org-server*.jar|head -n1` echo restarting $jarname nohup java -jar $jarname --spring.profiles.active=uat-test >nohup.out 2>&1 & tail -f nohup.out

然后./start.sh 启动

查看实时日志旧

tail -f nohupout

最新回复(0)