Linux服务器部署Spring Boot项目的一些shell命令脚本

1.启动jar包的命令(根据jar包数量创建,并指定相对应的jar包)

powershell 复制代码
nohup java -server -Xms64m -Xmx128m -jar 项目jar包的名称.jar --spring.profiles.active=prod > 记录jar包的日志.log 2>&1 &

可以写在start.sh文件里(没有就新建)

给start.sh设置权限

powershell 复制代码
chmod a+x start.sh

2.给log日志文件设置权限

powershell 复制代码
chmod 775 jarlog.log

3.查看jarlog.log文件

powershell 复制代码
tail -f jarlog.log

注意:简单步骤就是这样的,需要根据需求来添加对应的sh文件。

欢迎各位大佬评论补充!

相关推荐
想不明白的过度思考者4 分钟前
Spring Boot 配置文件深度解析
java·spring boot·后端
Full Stack Developme2 小时前
Linux 多种压缩格式,优缺点和适用场景
linux·运维·服务器
旖旎夜光2 小时前
Linux(4)(下)
linux·学习
TG:@yunlaoda360 云老大6 小时前
华为云国际站代理商GeminiDB的企业级高可用具体是如何实现的?
服务器·网络·数据库·华为云
Shanxun Liao6 小时前
Cenots 7.9 配置多台 SSH 互信登陆免密码
linux·运维·ssh
j_xxx404_6 小时前
Linux:第一个程序--进度条|区分回车与换行|行缓冲区|进度条代码两个版本|代码测试与优化
linux·运维·服务器
looking_for__7 小时前
【Linux】Ext系列文件系统
linux
OliverH-yishuihan8 小时前
开发linux项目-在 Windows 上 基于“适用于 Linux 的 Windows 子系统(WSL)”
linux·c++·windows
隔壁阿布都8 小时前
使用LangChain4j +Springboot 实现大模型与向量化数据库协同回答
人工智能·spring boot·后端
古城小栈9 小时前
Spring Boot 数据持久化:MyBatis-Plus 分库分表实战指南
spring boot·后端·mybatis