ubuntu服务器 部署项目(jar包)

2020-01-02  本文已影响0人  淡意的温柔丶
   #查看nohup是否安装
    which nohup
   #已安装,加入环境变量
    vim /etc/profile
   #保存
    source /etc/profile
   #查看版本
    nohup --version
#进入tomcat/webapps 下
 cd /opt/apache-tomcat-9.0.30/webapps
# 启动项目(testLogs.txt 日志文件   2>&1  重定向标准输出和标准错误,保证普通日志与错误日志在一个文件中)
nohup java -jar springTestDomo.jar > testLogs.txt 2>&1 &  
// 查看进程
ps -ef | grep java         
如下表示已启动
相应目录下已看到 testLogs.txt 日志文件
上一篇 下一篇

猜你喜欢

热点阅读