jar服务部署

1.进入jar包所在文件夹中

2.启动jar,将jar在后台运行,并且记录jar的pid 命令为 : nohup  java  -jar  test.jar (同jar包的配置文件要在jar包同级目录内,如perporties文件)

3.查看运行的jar的pid,看看jar程序是否运行 :ps -ef|grep java

4.如果文件过大,可在不停止jar包的情况下清空日志文件,用命令 : cp /dev/null nohup.out  清空文件



文章转载至:https://blog.csdn.net/u013164612/article/details/80347857

猜你喜欢

转载自www.cnblogs.com/nhdlb/p/11707000.html