centos7变化很大,降低了rc.local优先级,但没取消。
- chmod +x /etc/rc.d/rc.local
- systemctl enable rc-local.service
- systemctl start rc-local.service
----------------------option----------------------------
- vim /lib/systemd/system/rc-local.service
[Install]
WantedBy=multi-user.target
- ln -s '/lib/systemd/system/rc-local.service' '/etc/systemd/system/multi-user.target.wants/rc-local.service'
- systemctl enable rc-local.service
- Systemctl start rc-local.service