首页 > 解决方案 > Ubuntu告诉我找不到spring boot应用程序的init.d服务并且无法运行它

问题描述

我已按照作为 init.d 服务(系统 V)安装的 Spring Boot 部署 https://docs.spring.io/spring-boot/docs/current/reference/html/deployment.html#deployment-install

我的行动如下:

sudo ln -s /home/centre-0.0.1-SNAPSHOT.jar /etc/init.d/centre-0.0.1-SNAPSHOT

并开始:

service centre-0.0.1-SNAPSHOT start

我收到一个错误:

Failed to start centre-0.0.1-SNAPSHOT.service: Unit centre-0.0.1-SNAPSHOT.service not found.

有什么我忘记的操作吗?

标签: javalinuxspring-bootubuntu

解决方案


我使用了 sudo chmod +x /etc/inti.d/appname 命令并使用了 sudo /etc/init.d/appname start 命令。有用。


推荐阅读