深圳有名的室内设计公司盐城网页优化公司
深圳有名的室内设计公司,盐城网页优化公司,网站系统维护要多久,做网站公示大家好#xff0c;我是雄雄#xff0c;欢迎关注微信公众号#xff1a;雄雄的小课堂 查询运行项目的进程 ps -aux|grep farbeat 杀死进程 kill -9 1600336进入目录 cd /www/wwwroot/farbeat/查看文件
ls将日志输出在nohup文件中的方式启动项目(注意.jar文件的名字)
nohup j… 大家好我是雄雄欢迎关注微信公众号雄雄的小课堂 查询运行项目的进程 ps -aux|grep farbeat 杀死进程 kill -9 1600336进入目录 cd /www/wwwroot/farbeat/查看文件
ls将日志输出在nohup文件中的方式启动项目(注意.jar文件的名字)
nohup java -jar javaProject.jar 实时查看nohup日志文件中的输出
tail -f nohup.out查询最近200条日志记录
tail -n 200 nohup.out用.sh文件方式启动
./run-dev.sh .sh文件的示例(注意.jar的名字prot端口号以及redis的密码)
nohup /usr/local/java/jdk1.8.0_171/bin/java -Dfile.encodingutf-8 -jar javaProject.jar --spring.profiles.activedev --server.port8080 --spring.redis.host127.0.0.1 --spring.redis.password666 停止服务的命令注意.jar文件的名字
#!/bin/sh
RESOURCE_NAMEjavaProject.jartpidps -ef|grep $RESOURCE_NAME|grep -v grep|grep -v kill|awk {print $2}
if [ ${tpid} ]; then
echo Stop Process...
kill -15 $tpid
fi
sleep 5
tpidps -ef|grep $RESOURCE_NAME|grep -v grep|grep -v kill|awk {print $2}
if [ ${tpid} ]; then
echo Kill Process!
kill -9 $tpid
else
echo Stop Success!
fi
sleep 2
tpidps -ef|grep $RESOURCE_NAME|grep -v grep|grep -v kill|awk {print $2}
if [ ${tpid} ]; thenecho App is running.
elseecho App is NOT running.
fi启动的命令注意.jar文件端口redis的密码
#!/bin/sh
RESOURCE_NAMEGTWork.jartpidps -ef|grep $RESOURCE_NAME|grep -v grep|grep -v kill|awk {print $2}
if [ ${tpid} ]; then
echo Stop Process...
kill -15 $tpid
fi
sleep 5
tpidps -ef|grep $RESOURCE_NAME|grep -v grep|grep -v kill|awk {print $2}
if [ ${tpid} ]; then
echo Kill Process!
kill -9 $tpid
else
echo Stop Success!
fi
sleep 2
tpidps -ef|grep $RESOURCE_NAME|grep -v grep|grep -v kill|awk {print $2}
if [ ${tpid} ]; thenecho App is running.
elseecho App is NOT running.
firm -f tpid
# nohup java -jar ./$RESOURCE_NAME --spring.profiles.activeprod
nohup /usr/local/java/jdk1.8.0_171/bin/java -Dfile.encodingutf-8 -jar javaProject.jar -spring.profiles.activedev -server.port8080 -spring.redis.host127.0.0.1 -spring.redis.password666
echo $! tpiding.profiles.activedev -server.port8080 -spring.redis.host127.0.0.1 -spring.redis.password666
echo $! tpid
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/diannao/89213.shtml
如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!