Home > php教程 > php手册 > body text

php-fpm平滑启动并配置服务

WBOY
Release: 2016-06-06 20:14:09
Original
1345 people have browsed it

我的php是源码安装的。php-fpm在PHP 5.3.2以后的版本不支持以前的php-fpm (start|restart|stop|reload) ,那么如果将php-fpm配置成服务,并添加平滑启动/重启。 配置php-fpm.conf (vi /usr/local/php54/etc/php-fpm.conf),将pid(;pid = run/php-fpm.pid)

我的php是源码安装的。php-fpm在PHP 5.3.2以后的版本不支持以前的php-fpm (start|restart|stop|reload) ,那么如果将php-fpm配置成服务,并添加平滑启动/重启。

配置php-fpm.conf(vi /usr/local/php54/etc/php-fpm.conf),将pid(;pid = run/php-fpm.pid)前的;去掉。

因为编译安装php的,所以会在php目录生成很多二进制文件,找到init.d.php-fpm,拷贝到init.d下
cp /usr/local/src/php54/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm

设置权限,并添加服务

chmod +x /etc/init.d/php-fpm
chkconfig --add php-fpm
Copy after login



以后可以使用如下命令管理php-fpm

service php-fpm start
service php-fpm stop
service php-fpm restart
service php-fpm reload
Copy after login

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!