后台启动jar命令
nohup java -jar epc.jar > log.file 2>&1 &
查看jar日志
vim log.file
杀死jar
- 如果知道jar的端口号,使用如下命令查询端口对应的进程id,并结束进程
netstat -nlp |grep :9999
kill -9 18008
![](https://img.haomeiwen.com/i7307975/1af5c8f9027899b8.png)
- 如果不知道jar的端口号,可以通过jar名称查询进程id
ps aux|grep epc.jar
kill -9 15693
![](https://img.haomeiwen.com/i7307975/da91c24c7200c1fd.png)
nohup java -jar epc.jar > log.file 2>&1 &
vim log.file
netstat -nlp |grep :9999
kill -9 18008
ps aux|grep epc.jar
kill -9 15693
本文标题:liunx部署jar、查看jar、杀死jar
本文链接:https://www.haomeiwen.com/subject/wuaxnqtx.html
网友评论