CentOS7开机自启动脚本


添加内容到

vi  /etc/rc.d/rc.local


在centos7中,/etc/rc.d/rc.local的权限被降低了,所以需要执行如下命令赋予其可执行权限 

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


启动服务

systemctl status   rc-local.service
systemctl start    rc-local.service
systemctl enable   rc-local.service
systemctl status   rc-local.service

文章最后更新时间: 2021-12-06 21:45:16