栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > PHP

php-fpm自动启动方式

PHP 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

php-fpm自动启动方式

实验环境:

VM虚拟机

CentOS操作系统

第一种方式:通过脚本

[root@www ~]# cd  /etc/init.d

[root@www init.d]# pkill  php-fpm

[root@www init.d]# ps  -ef|grep php-fpm

root      1657  1629  0 23:11 pts/0    00:00:00 grep php-fpm

[root@www init.d]# vi  php-fpm      #脚本见附件

[root@www init.d]# chmod  a+x  php-fpm  #添加执行权限

[root@www init.d]# chkconfig  --add  php-fpm  #加入服务

 [root@www init.d]# chkconfig  php-fpm  on   #开机自动启动服务

[root@www init.d]# service php-fpm start 

[root@www init.d]# ps -ef|grep php-fpm

root      1673     1  0 23:13 ?        00:00:00 php-fpm: master process (/application/php5.3.27/etc/php-fpm.conf)

nginx     1674  1673  0 23:13 ?        00:00:00 php-fpm: pool www           

nginx     1675  1673  0 23:13 ?        00:00:00 php-fpm: pool www           

root      1677  1629  0 23:13 pts/0    00:00:00 grep php-fpm

第二种方式:

[root@www ~]# vi /etc/rc.local

#追加到末尾

/application/php/sbin/php-fpm

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/227635.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号