chmod 0755 /etc/rc.localsystemctl enable rc-local.service --nowsystemctl restart rc-local.service
转:https://www.cnblogs.com/itxdm/p/CentOS_7_does_not_execute_the_file_etc_rc_d_rc_local.html