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

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

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