First check whether there is the following content in the /usr/lib/systemd/system/rc-local.service file, if not, add it
[Install]
WantedBy=multi-user.target
Then check the status of the self-starting command service, dead means that the rc-local service is not started
systemctl status rc-local
Start the rc-local service
systemctl start rc-local
The service is added to start automatically at boot
systemctl enable rc-local
Then grant executable permissions to the rc.local file
chmod +x /etc/rc.d/rc.local
Done, reboot
reboot