linux配置开机启动

/ linux / 0 条评论 / 2262浏览

设置开机启动

脚本设置启动权限:

chmod +755 /home/sugon/restart.sh

检查rc-local是否正常启动

systemctl status rc-local

设置开机启动命令

sudo chmod -R 755 /etc/rc.d/rc.local

加入命令

sudo vim /etc/rc.d/rc.local 
su - sugon -c "/home/sugon/restart.sh"

执行命令

systemctl restart rc-local
systemctl enable rc-local
评论已关闭.