啟用HOST機的/etc/rc.local
設置開機啟動腳本
1、建立rc-local.service文件
2、將下列內容復制進rc-local.service文件
[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local
[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99
[Install]
WantedBy=multi-user.target
3、創建文件rc.local
4、將下列內容復制進rc.local文件
5、給rc.local加上權限
6、啟用服務
sudo systemctl enable rc-local
sudo systemctl start rc-local
Last updated