博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
spring boot部署中executable的系统服务
阅读量:4706 次
发布时间:2019-06-10

本文共 803 字,大约阅读时间需要 2 分钟。

首先在pom.xml 中添加spring boot插件,并设置

org.springframework.boot
spring-boot-maven-plugin
true

打包成jar包

创建软连接至/etc/init.d下

sudo ln -s /var/myapp/myapp.jar /etc/init.d/myapp

此时报错

查看日志位于/var/log/(你的项目mingcheng).log

报错为

  start-stop-daemon: unrecognized option '--no-close'

  Try 'start-stop-daemon --help' for more information.

没有安装start-stop-daemon

安装执行以下命令

wget http://ftp.de.debian.org/debian/pool/main/d/dpkg/dpkg_1.17.10.tar.xz

tar -xf dpkg_1.17.10.tar.xz

cd dpkg_1.17.6

./configure #这一步如果提示缺少curses,需要yun install ncurses-devel

 

make

sudo cp start-stop-daemon /usr/local/bin/start-stop-daemon

 

再次运行

 

转载于:https://www.cnblogs.com/oldzhang1222/p/9621652.html

你可能感兴趣的文章
OnePage收集
查看>>
Java parseInt()方法
查看>>
yahoo的30条优化规则
查看>>
[CCF2015.09]题解
查看>>
[NYIST15]括号匹配(二)(区间dp)
查看>>
json_value.cpp : fatal error C1083: 无法打开编译器生成的文件:No such file or directory
查看>>
洛谷 P1101 单词方阵
查看>>
Swift DispatchQueue
查看>>
C#和JAVA 访问修饰符
查看>>
小甲鱼OD学习第1讲
查看>>
HDU-1085 Holding Bin-Laden Captive-母函数
查看>>
php提示undefined index的几种解决方法
查看>>
LRJ
查看>>
Struts2环境搭建
查看>>
Linux: Check version info
查看>>
stl学习之测试stlen,cout等的运行速度
查看>>
魔戒三曲,黑暗散去;人皇加冕,光明归来
查看>>
Error和Exception
查看>>
Python和Singleton (单件)模式[转载]
查看>>
httpclient设置proxy与proxyselector
查看>>