centos设置开机自启动脚本 1、首先,脚本具有可执行权限 chmod 755 test.sh 2、然后将脚本存放的绝对路径+脚本全名追加到/etc/rc.d/rc.local文件最后 root/test.sh 3、在centos7中,/etc/rc.d/rc.local的权限被降低了,所以需要执行如下命令赋予其可执行权限 chmod +x /etc/rc.d/rc.local