【php】 php-fpm 配置见解
来源: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.
最新文章
- IOS开发基础知识--碎片38
- R读取溢出的数据
- MFC编程入门之二十七(常用控件:图片控件PictureControl)
- IELTS Writing Tips
- [转]菜鸟程序员之Asp.net MVC Session过期异常的处理
- 利用 Rational ClearCase ClearMake 构建高性能的企业级构建环境
- raspberry pi 如何汉化显示中文
- Oracle 中 call 和 exec的区别
- interblock corruption &; intrablock corruption
- 自定义控件winfrom
- OSX apache vhost 配置多站点时403错误解决方法
- python分页和session和计算时间差
- python3 pyqt5 和eric5配置教程
- ORACLE PL/SQL异常处理(Exception)学习笔记
- scip习题(1) scheme和c实现的对比
- AT NEW 和 AT END OF 的用法
- 面试中的Https
- stm32开发之串口的调试
- Ubuntu 系统安装详解 19.04最新版本
- Python学习心得--变量类型篇