上传到项目后
首先到项目路径下,通过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
转载请注明原文地址: https://lol.8miu.com/read-2651.html