码迷,mamicode.com
首页 > Web开发 > 详细

php-fpm启动脚本

时间:2016-09-06 15:10:48      阅读:158      评论:0      收藏:0      [点我收藏+]

标签:

1.安装php时,在源码目录下默认有个脚本文件,拷贝到/etc/init.d目录下就可以直接用

[root@web-node01 ~]# cp /usr/local/src/php-5.6.20/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm

2.注意,php-fpm启动脚本依赖与php-fpm.pid文件,此时需要在php-fpm.conf开启pid参数

[root@web-node01 ~]# vim /usr/local/php/etc/php-fpm.conf
  1 ;;;;;;;;;;;;;;;;;;;;;
  2 ; FPM Configuration ;
  3 ;;;;;;;;;;;;;;;;;;;;;
  4 
  5 ; All relative paths in this configuration file are relative to PHPs install
  6 ; prefix (/usr/local/php-5.6.20). This prefix can be dynamically changed by using the
  7 ; -p argument from the command line.
  8 
  9 ; Include one or more files. If glob(3) exists, it is used to include a bunch of
 10 ; files from a glob(3) pattern. This directive can be used everywhere in the
 11 ; file.
 12 ; Relative path can also be used. They will be prefixed by:
 13 ;  - the global prefix if its been set (-p argument)
 14 ;  - /usr/local/php-5.6.20 otherwise
 15 ;include=etc/fpm.d/*.conf
 16 
 17 ;;;;;;;;;;;;;;;;;;
 18 ; Global Options ;
 19 ;;;;;;;;;;;;;;;;;;
 20 
 21 [global]
 22 ; Pid file
 23 ; Note: the default prefix is /usr/local/php-5.6.20/var
 24 ; Default Value: none
 25 pid = run/php-fpm.pid             # 注释取消
 26 

3.启动测试

[root@web-node01 ~]# /etc/init.d/php-fpm stop
Gracefully shutting down php-fpm . done
[root@web-node01 ~]# /etc/init.d/php-fpm start
Starting php-fpm  done

 

php-fpm启动脚本

标签:

原文地址:http://www.cnblogs.com/sunmmi/p/5845476.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!