本次以Apache为例:
vim /etc/rc.d/rc.local
在最下行添加一下内容
/home/httpd.sh
httpd.sh内容如下
#!/bin/bash
systemctl start httpd
最后重启服务器测试
reboot
本次以Apache为例:
vim /etc/rc.d/rc.local
在最下行添加一下内容
/home/httpd.sh
httpd.sh内容如下
#!/bin/bash
systemctl start httpd
最后重启服务器测试
reboot