我按照spring boot参考指南将service安装为init.d服务,但它似乎不起作用。你知道这里可能出了什么问题吗?
AWS上的Ubuntu主机
$ cat /etc/issue
Ubuntu 14.04.3 LTS \n \l已按照参考文档使用symlink将应用程序安装为init.d服务
$ sudo ln -s /opt/services/account-history-service/account-history-service-0.0.1-217782-SNAPSHOT.jar /etc/init.d/account-history-service
$ sudo /etc/init.d/account-history-service status
sudo: /etc/init.d/account-history-service: command not found
$ sudo chmod +x /etc/init.d/account-history-service已尝试启动,但失败,出现以下错误
$ sudo /etc/init.d/account-history-service start
/etc/init.d/account-history-service: 1: /etc/init.d/account-history-service: Syntax error: "(" unexpected你知道可能出了什么问题吗?这个版本的ubuntu不受支持吗?
发布于 2017-07-17 18:22:47
这对我很有效。首先,确保您已经在POM.xml中为完全可执行的jar配置了maven。然后重新构建应用程序并再次创建符号链接。
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<executable>true</executable>
</configuration>
</plugin>https://stackoverflow.com/questions/34427274
复制相似问题