五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

spring boot 應(yīng)用 systemd 管理簡單說明

2022-11-20 09:38 作者:限量版范兒  | 我要投稿

基于systemd 的spring boot 應(yīng)用管理有一個比較方便的能力,就是不用復(fù)雜的java 進程處理了,應(yīng)用發(fā)布只需要
進行jar 文件的copy 處理,然后就是服務(wù)的重啟了systemctl restart <servicename>

應(yīng)用權(quán)限處理

?

chmod 500 /opt/my-application.jar

參考配置

[Unit]Description=A Spring Boot applicationAfter=syslog.target[Service]User=myapplicationExecStart=/opt/my-application.jarSuccessExitStatus=143Restart=alwaysRestartSec=5[Install]WantedBy=multi-user.target

說明

以上是一個模式,實際上對于ExecStart 部分也是也可以直接使用<java path > -jar app.jar?注意java 使用絕對路徑
同時最好大家的服務(wù)都開啟開機自啟動systemctl enable <appname>.service

?

[Unit]Description=mydemo appAfter=syslog.target

?

[Service]User=rootExecStart=/usr/bin/java -jar /opt/app.jarSuccessExitStatus=143Restart=alwaysRestartSec=5

?

[Install]WantedBy=multi-user.target

參考資料

https://docs.spring.io/spring-boot/docs/current/reference/html/deployment.html
https://www.freedesktop.org/software/systemd/man/systemd.service.html
https://www.baeldung.com/spring-boot-app-as-a-service
https://serverfault.com/questions/695849/services-remain-in-failed-state-after-stopped-with-systemctl

https://www.dianjilingqu.com/616267.html

spring boot 應(yīng)用 systemd 管理簡單說明的評論 (共 條)

分享到微博請遵守國家法律
武城县| 宿松县| 金溪县| 绩溪县| 康定县| 无为县| 济南市| 威远县| 潞西市| 阳原县| 喜德县| 普定县| 黎平县| 泸水县| 如皋市| 黄浦区| 左贡县| 略阳县| 织金县| 瓮安县| 建昌县| 吴桥县| 辽中县| 玉林市| 甘肃省| 郴州市| 东乡族自治县| 葫芦岛市| 鄯善县| 武冈市| 大丰市| 景泰县| 肥城市| 静海县| 蓝山县| 林西县| 汝南县| 竹北市| 上饶县| 乡城县| 延庆县|