执行 ll /etc/rc.local
命令,发现 /etc/rc.local
映射文件是 /etc/rc.d/rc.local
再 ll /etc/rc.d/rc.local
发现这个文件没有执行权限(少了x);
其实 vi /etc/rc.local
有这样一段话
# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
# that this script will be executed during boot.
所以执行 chome +x /etc/rc.d/rc.local
命令后,启动可以执行这个文件了。