zoukankan      html  css  js  c++  java
  • centos7下添加开机启动

    在/etc/systemd/system下创建weblogic .Service

    touch weblogic.Service

    添加启动权限

    chmod +x weblogic.Service

     编辑weblogic.Service

    vim weblogic.Service

    [Unit]

    Description=weblogic Service          #服务的说明

    After=syslog.target ntpdate.service sntp.service  #启动顺序,表示这些服务启动后启动该服务

    [Service]                #此块对服务器进行设置

    Type=simple                 #服务类型

    User=weblogic                  #启动的用户

    Group=weblogic                         #启动的组

    ExecStart=/etc/init.d/weblogic start         #启动时调用的脚本和参数

    ExecStop=/etc/init.d/weblogic stop          #停止时调用的脚本和参数

    ExecReload=/etc/init.d/weblogic restart       #重启时调用的脚本和参数

    [Install]

    WantedBy=multi-user.target                 #启动的级别,相当域centos6中的init 3

    更多参数,可以参考一下连接

    http://www.ruanyifeng.com/blog/2016/03/systemd-tutorial-commands.html

  • 相关阅读:
    程序员如何制定自己的一份年度计划
    【Spring入门系列】篇3:再探IOC
    【Spring入门系列】篇2:SpringIOC入门
    【Spring入门系列】篇1:Spring简介
    适配器模式
    java编程思想之正则表达式
    代理模式
    建造者模式
    抽象工厂模式
    工厂方法模式
  • 原文地址:https://www.cnblogs.com/xiaoyaoren/p/9944592.html
Copyright © 2011-2022 走看看