在rc.local
增加启动代码就可以了。
1、查看nginx和php-fpm可执行文件所在位置
whereis nginx
whereis php-fpm
一般安装在 /usr/sbin/nginx 和 /usr/sbin/php-fpm
2、编辑rc.local文件
sudo vi /etc/rc.local
3、在文件末尾插入行
/usr/sbin/nginx
/usr/sbin/php-fpm
在rc.local
增加启动代码就可以了。
1、查看nginx和php-fpm可执行文件所在位置
whereis nginx
whereis php-fpm
一般安装在 /usr/sbin/nginx 和 /usr/sbin/php-fpm
2、编辑rc.local文件
sudo vi /etc/rc.local
3、在文件末尾插入行
/usr/sbin/nginx
/usr/sbin/php-fpm