天天看點

Centos7中rc.local不好用的問題解決

在Centos7下,rc.local檔案,開機預設是不執行的

Centos7中rc.local不好用的問題解決

翻譯下

這個檔案是為相容性而添加的

在開機過程中強烈建議建立自己的systemd服務或udev規則來運作腳本,而不是使用此檔案

和以前版本相比,此腳本将不會在在其它服務後運作

記住,必須運作

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

指令來確定啟動過程中執行此腳本 .

是以我們應該給

/etc/rc.d/rc.local

加執行權限

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

執行前:

Centos7中rc.local不好用的問題解決

執行後:

Centos7中rc.local不好用的問題解決

看,權限加上了。開機即可執行了!

繼續閱讀