linux 下 nginx 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

发布了44 篇原创文章 · 获赞 28 · 访问量 42万+

猜你喜欢

转载自blog.csdn.net/hanzengyi/article/details/99850470