Substitute the Sys V init with systemd #15
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
使用
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
应该一致,且部署与清除之间文件未发生修改,否则可能出现清除不干净的情况。现在部署成功后的结果:
通过
http://localhost:8080/swagger-ui/index.html
访问:清理脚本运行结果:
清理会清除创建的用户,生成的
jar
包,service
文件等,但不会删除开始安装的包,例如java
,python
。