vi /usr/lib/systemd/system/jms.service
[Unit]
Description=jms
After=network.target mariadb.service redis.service
Wants=mariadb.service redis.service [Service]
Type=forking
Environment="PATH=/opt/py3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin"
ExecStart=/opt/jumpserver/jms start all -d
ExecReload=
ExecStop=/opt/jumpserver/jms stop [Install]
WantedBy=multi-user.target

  

 vi /usr/lib/systemd/system/coco.service
[Unit]
Description=coco
After=network.target jms.service [Service]
Type=forking
PIDFile=/opt/coco/coco.pid
Environment="PATH=/opt/py3/bin"
ExecStart=/opt/coco/cocod start -d
ExecReload=
ExecStop=/opt/coco/cocod stop [Install]
WantedBy=multi-user.target

   设置开启自启动

systemctl enable jms
systemctl enable coco

  

Jumpserver之设置开机自启动的更多相关文章

  1. Fedora 16设置开机自启动程序与Ubuntu的区别

    Ubuntu设置开机自启动脚本的方法是:修改/etc/init.d/rc.local这个文件,添加需要启动的程序即可,相关函数如下: void SetSysAutoBoot() { ] = {}; ; ...

  2. linux_设置开机自启动程序脚本

    设置开机自启动

  3. Linux服务器,服务管理--systemctl命令详解,设置开机自启动

    Linux服务器,服务管理--systemctl命令详解,设置开机自启动 syetemclt就是service和chkconfig这两个命令的整合,在CentOS 7就开始被使用了. 摘要: syst ...

  4. CentOS 6下 Oracle11gR2 设置开机自启动

    [1] 更改/etc/oratab # This file is used by ORACLE utilities. It is created by root.sh # and updated by ...

  5. Ubuntu14.04设置开机自启动脚本

    方法一.编辑rc.loacl脚本  Ubuntu开机之后会执行/etc/rc.local文件中的脚本,所以我们可以直接在/etc/rc.local中添加启动脚本.在 exit 0 前面添加好脚本代码, ...

  6. 设置开机自启动VirtualBox虚拟机系统

    如果常用VirtualBox虚拟机系统的话,设置个随开机启动也是很方便的.不需要打开VirtualBox窗口,直接就是系统启动了. 又继续上网搜索学习了.(设置开机自启动VirtualBox虚拟机系统 ...

  7. CentOS7设置开机自启动命令大全

    任务 旧指令 新指令 使某服务自动启动 chkconfig --level 3 httpd  on              systemctl enable httpd.service 使某服务不自 ...

  8. ntp服务设置开机自启动失败

    设置了ntpd开机自启动,重启服务器ntpd没有自启动 1.需要禁掉chronyd.service: systemctl disable chronyd.service 2.手动启动ntpd: sys ...

  9. CentOS7设置开机自启动方式

    方式一: # 在/etc/rc.d/rc.local文件中追加启动命令,该文件追加后,会随着机器自动后,自动运行文件中的命令 # vim /etc/rc.d/rc.local # 权限问题:在cent ...

随机推荐

  1. swagger-ui中测试接口(enum传值) 报400错误

    swagger-ui中测试接口(enum传值) 报400错误 PriceRuleController: @PostMapping("/update") @ApiOperation( ...

  2. upgrade openssl

    01  OpenSSL version wiki:https://en.wikipedia.org/wiki/OpenSSL 02 Using TLS1.3 With OpenSSL https:// ...

  3. 洛谷P5280 [ZJOI2019]线段树 [线段树,DP]

    传送门 无限Orz \(\color{black}S\color{red}{ooke}\)-- 思路 显然我们不能按照题意来每次复制一遍,而多半是在一棵线段树上瞎搞. 然后我们可以从\(modify\ ...

  4. 浅谈z-index

    z-index使用条件 CSS3之前,z-index属性只有和定位元素在(postion不为static的元素)一起的时候才会有作用,但CSS3中flex盒子的子元素也可以设置z-index.理论上来 ...

  5. sort和priority_queue的比较函数总结

    对于priority_queue来说,,比较函数为(如果不是结构体,直接int,优先队列默认的是值越大优先级越大): struct st { string str; int pr, value,mar ...

  6. myeclipse安装spring插件

    1.查看 myeclipse 中的 eclipse 对应的版本 2.下载对应eclipse的 spring 插件 首先要安装spring插件,可以到spring官网下载  地址(https://spr ...

  7. 关于 UNIX 的哲理名言(中英文对照)

    UNIX 的特点: Everything (including hardware) is a file.所有的事物(甚至硬件本身)都是一个的文件. Configuration data stored ...

  8. Spring Boot重定向的使用方法

    @RequestMapping(value = "/redirect", method = RequestMethod.GET) public void redirecttest( ...

  9. 办公用品管理系统VB——模块

    'DbFunc.bas'== 标记数据库是否连接 == Private IsConnect As Boolean '== 标记执行Connect()函数后,访问数据库的次数 == Private Co ...

  10. 解决问题:CA_ERROR证书出错,请登录微信支付商户平台下载证书-企业付款到零钱接口(原创)

    这几天用到了微信企业付款到零钱这个接口,结果出现了报错:CA_ERROR, 该接口的API说明和报错提示说明:https://pay.weixin.qq.com/wiki/doc/api/tools/ ...