来源:php官方文档

Init script setup
===

You will probably want to create an init script for your new php-fpm. Fortunately, PHP 5.3.3 provides one for you, which you should copy to your init directory and change permissions:

$ cp <php-5.3.3-source-dir>/sapi/fpm/init.d.php-fpm.in /etc/init.d/php-fpm
$ chmod 755 /etc/init.d/php-fpm

It requires a certain amount of setup. First of all, make sure your php-fpm.conf file is set up to  create a PID file when php-fpm starts. E.g.:
----
pid = /var/run/php-fpm.pid
----
(also make sure your php-fpm user has permission to create this file).

Now open up your new init script (/etc/init.d/php-fpm) and set the variables at the top to their relevant values. E.g.:
---
prefix=
exec_prefix=
php_fpm_BIN=/sbin/php-fpm
php_fpm_CONF=/etc/php-fpm.conf
php_fpm_PID=/var/run/php-fpm.pid
---

Your init script is now ready. You should now be able to start, stop and reload php-fpm:

$ /etc/init.d/php-fpm start
$ /etc/init.d/php-fpm stop
$ /etc/init.d/php-fpm reload

The one remaining thing you may wish to do is to add your new php-fpm init script to system start-up. E.g. in CentOS:

$ /sbin/chkconfig php-fpm on

===========

Disclaimer: Although I did just do this on my own server about 20 mins ago, everything I've written here is off the top of my head, so it may not be 100% correct. Also, allow for differences in system setup. Some understanding of what you are doing is assumed.

【php】 php-fpm 配置见解的更多相关文章

  1. fpm 配置详解

    约定几个目录 /usr/local/php/sbin/php-fpm /usr/local/php/etc/php-fpm.conf /usr/local/php/etc/php.ini 一,php- ...

  2. php.ini配置max_execution_time和FPM配置request_terminate_timeout

    PHP限定脚本执行时长的方式有几种,下面说下php.ini中的max_execution_time和php-fpm.conf中的request_terminate_timeout 1. php.ini ...

  3. PHP fpm配置和优化

    pm.max_children = 1024 #最大子进程数 maximum number of child processes when pm is set to 'dynamic' or 'ond ...

  4. PHP-max_execution_time与fpm.request_terminate_timeout介绍

    前段时间一位同事跟我说php脚本超时时间以fpm配置优先.经过自己测试后,其实不然,前面的观点只是在某些情况下成立. php脚本超时时间可以在php.ini的max_execution_time和fp ...

  5. FPM三:简单的SEARCH(OIF)

    这里是使用FPM Workbench自动生成的,没有去SE80创建WDA程序. 1.使用事务代码:FPM_WB.打开工作台. 2.点击Wizard for Creating Empty FPM App ...

  6. zabbix自定义key监控nginx和fpm(网站并发数)

    一. nginx编译参数 监控nginx,主要讲解监控并发数 --prefix=/usr/local/nginx --with-http_stub_status_module zabbix编译参数的查 ...

  7. linux--->阿里云centos6.9环境配置安装lnmp

    阿里云centos6.9环境配置安装lnmp mysql安装 本人博客:http://www.cnblogs.com/frankltf/p/8615418.html PHP安装 1.安装依赖关系 yu ...

  8. API返回延迟,FPM重启后恢复之后又重现 问题解决方案

    背景 最近在提供后台API时,提供了一个简单逻辑的接口 部署在测试环境,自测没问题,提交测试 突然有一天,接口响应延迟严重,几乎每次都是3-4秒返回 这对于一个接口来说,肯定是有问题的 于是便有了以下 ...

  9. Jexus 支持PHP的三种方式

    Jexus不仅支持ASP.NET,而且能够通个自带的PHP-FCGI服务以及PHP-FPM等方式灵活支持PHP而且还可以以.NET(Phalanger)方式支持PHP. PHP-FCGI服务支持PHP ...

随机推荐

  1. #13:人十我一Orz——6

    水题放送,写得依旧丑: #include <cstdio> #include <cstring> #include <cmath> #include <alg ...

  2. 117 Populating Next Right Pointers in Each Node II 每个节点的右向指针 II

    这是“每个节点的右向指针”问题的进阶.如果给定的树可以是任何二叉树,该怎么办?你以前的解决方案仍然有效吗?注意:    你只能使用恒定的空间.例如,给定以下二叉树,         1       / ...

  3. HackerRank Super Six Substrings dp

    https://www.hackerrank.com/contests/hourrank-18/challenges/super-six-substrings 能被6整除的数有一个特点,就是能同时被3 ...

  4. Storm编程入门API系列之Storm的Topology多个Executors数目控制实现

    前期博客 Storm编程入门API系列之Storm的Topology默认Workers.默认executors和默认tasks数目 Storm编程入门API系列之Storm的Topology多个Wor ...

  5. split()分割字符串用法

    <script type="text/javascript"> var str="How are you doing today?" documen ...

  6. Windows下Apache+PHP+MySQL开发环境的搭建(WAMP)

    准备工作: 1.下载apache服务器安装包,官网http://www.apache.org/,下载地址:http://httpd.apache.org/download.cgi 2.下载MySQL, ...

  7. Objective-C Data Encapsulation

    All Objective-C programs are composed of the following two fundamental elements: Program statements ...

  8. 不同版本的 Tomcat 设置用户名密码 的方法

    Tomcat : tomcat根目录\conf\tomcat-users.xml,找到 <tomcat-users> 标签,在后面添加 <user username="ad ...

  9. vijos 1034 家族(水题日常)

    描述 若某个家族人员过于庞大,要判断两个是否是亲戚,确实还很不容易,现在给出某个亲戚关系图,求任意给出的两个人是否具有亲戚关系. 规定:x和y是亲戚,y和z是亲戚,那么x和z也是亲戚.如果x,y是亲戚 ...

  10. Clusterware 和 RAC 中的域名解析的配置校验和检查 (文档 ID 1945838.1)

    适用于: Oracle Database - Enterprise Edition - 版本 10.1.0.2 到 12.1.0.1 [发行版 10.1 到 12.1]Oracle Database ...