美文网首页
liunx 环境设置 springboot 项目开机启动

liunx 环境设置 springboot 项目开机启动

作者: shangyaqi | 来源:发表于2018-10-12 10:12 被阅读18次

1.在/etc/systemd/system/目录下新建文件springboot-test.service
[Unit]
Description=springboot-test
After=syslog.target

[Service]
ExecStart= /usr/bin/java -jar /home/test-0.0.1-SNAPSHOT.jar

[Install]
WantedBy=multi-user.target

2.systemctl start springboot-test
或systemctl start springboot-test.service
//设置开机自启
systemctl status springboot-test
或systemctl status springboot-test.service
//设置开机自启
systemctl enable springboot-test
或systemctl enable springboot-test.service
//查看日志
journalctl -u springboot-test
或 journalctl -u tespringboot-test.service

相关文章

  • liunx 环境设置 springboot 项目开机启动

    1.在/etc/systemd/system/目录下新建文件springboot-test.service[Uni...

  • liunx开机自动启动运行脚本

    liunx开机自动启动脚本的几种方法 我们常在windows上开机自动启动一些程序,但liunx大多会是二进制文件...

  • Liunx设置脚本开机启动办法

    -- liunx和windows机制不太相同,为了达到如重启后不再手动启动对应的内容的话 我们可以做到如下几方面来...

  • Docker

    下载关于Docker的依赖环境 设置Docker镜像源 安装Docker 启动Docker服务 设置开机自启动 测...

  • Mac下HomeBrew安装和卸载Mysql

    安装Mysql 设置MySql开机启动 启动Mysql 停止Mysql(设置了开机启动) 停止Mysql(未设置开...

  • Linux开机自启动tomcat

    操作环境 服务器centos7.3 配置开机自启动tomcat 众所周知,在Linux中设置开机自启动的服务,需要...

  • Linux 中 mysql 添加服务

    加入开机启动的命令,如下: 1.查看开机启动项 这里看到httpd和mysqld未设置开机自动启动2.设置开机启动...

  • centos7.3配置LAMP BY yum

    实验环境: 1、安装apache 启动apache服务、设置httpd服务开机启动、 数据库安全设置,(数据库ro...

  • linux 设置springboot jar开机启动

    在某个目录(此文以home目录为例)下创建 jar.sh, 然后增加以下信息 (JAVA_HOME和jar包根据...

  • Centos8 yum方式安装Mysql

    yum安装 检查是否已经设置为开机启动 设置开机启动 查看是否启动MySQL服务 启动服务 关闭服务 mysql登...

网友评论

      本文标题:liunx 环境设置 springboot 项目开机启动

      本文链接:https://www.haomeiwen.com/subject/fbywaftx.html