Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Substitute the Sys V init with systemd #15

Merged
merged 1 commit into from
Jul 31, 2024
Merged

Conversation

Kaiser-Yang
Copy link
Contributor

@Kaiser-Yang Kaiser-Yang commented Jul 31, 2024

使用systemd进行服务的部署更加符合现代linux的服务管理方案。

对于 #14 的解决:

  • 通过systemd部署会使用完整的java路径以及可以指定jar的存放位置(将mvn打包的jar拷贝到指定位置)

此外,增加了clean脚本。

使用方法:
如果通过bash deploy_ubuntu.sh config_debug.json进行了自动部署,则可以通过bash clean_ubuntu.sh config_debug.json的方式进行清除。注意两者的config_file.json应该一致,且部署与清除之间文件未发生修改,否则可能出现清除不干净的情况。

现在部署成功后的结果:
image

通过http://localhost:8080/swagger-ui/index.html访问:
image

清理脚本运行结果:
image

清理会清除创建的用户,生成的jar包,service文件等,但不会删除开始安装的包,例如java, python

This update is because more modern Linux distributions that use
`systemd`. Besides, this update also fixed #14 .
@Quentin9922 Quentin9922 merged commit d6df86c into develop Jul 31, 2024
1 check passed
@Kaiser-Yang Kaiser-Yang deleted the fix-deploy-kaiser branch August 16, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants