1、因为在centos7中/etc/rc.d/rc.local的权限被降低了,所以需要赋予其可执行权

chmod +x /etc/rc.d/rc.local

2、赋予脚本可执行权限
假设/usr/local/script/autostart.sh是你的脚本路径,给予执行权限

chmod +x /usr/local/script/autostart.sh

3、打开/etc/rc.d/rc.local文件,在末尾增加如下内容

/usr/local/script/autostart.sh

1、因为在centos7中/etc/rc.d/rc.local的权限被降低了,所以需要赋予其可执行权

chmod +x /etc/rc.d/rc.local

2、赋予脚本可执行权限
假设/usr/local/script/autostart.sh是你的脚本路径,给予执行权限

chmod +x /usr/local/script/autostart.sh

3、打开/etc/rc.d/rc.local文件,在末尾增加如下内容

/usr/local/script/autostart.sh

相关文章:

  • 2021-12-25
  • 2022-02-10
  • 2022-12-23
  • 2021-05-17
  • 2021-06-19
  • 2022-02-11
  • 2021-10-22
猜你喜欢
  • 2022-12-23
  • 2021-11-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-05
相关资源
相似解决方案