码迷,mamicode.com
首页 > 其他好文 > 详细

Centos7如何设置脚本开机自启动?

时间:2020-01-31 22:53:02      阅读:86      评论:0      收藏:0      [点我收藏+]

标签:设置   art   round   back   auto   config   centos7   des   shel   

1. 在需要设置为开机启动的脚本中加入必须的chkconfig启动脚本规范,如下:

#!/bin/bash
# chkconfig:   2345 80 12
# description:  auto start shell script

2. 使用chkconfig将脚本加入自动启动列表

# mv your.sh /etc/rc.d/init.d

# chkconfig /etc/rc.d/init.d/your.sh

Centos7如何设置脚本开机自启动?

标签:设置   art   round   back   auto   config   centos7   des   shel   

原文地址:https://www.cnblogs.com/dakewei/p/12246803.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!