php-fpm开机启动

2017/01/22 php

./configure –prefix=/usr/local/php
–with-config-file-path=/usr/local/php/etc
–enable-inline-optimization
–disable-debug
–disable-rpath
–enable-shared
–enable-opcache
–enable-fpm
–with-fpm-user=www
–with-fpm-group=www
–with-mysql=mysqlnd
–with-mysqli=mysqlnd
–with-pdo-mysql=mysqlnd
–with-gettext
–enable-mbstring
–with-iconv
–with-mcrypt
–with-mhash
–with-openssl
–enable-bcmath
–enable-soap
–with-libxml-dir
–enable-pcntl
–enable-shmop
–enable-sysvmsg
–enable-sysvsem
–enable-sysvshm
–enable-sockets
–with-curl
–with-zlib
–enable-zip
–with-bz2
–with-readline

=================php-fpm开机启动 vi /usr/local/php/etc/php-fpm.conf #编辑

user = www #设置php-fpm运行账号为www

group = www #设置php-fpm运行组为www

pid = run/php-fpm.pid #取消前面的分号

:wq! #保存退出

设置 php-fpm开机启动

cp /usr/local/src/php-5.5.14/sapi/fpm/init.d.php-fpm /etc/rc.d/init.d/php-fpm #拷贝php-fpm到启动目录

chmod +x /etc/rc.d/init.d/php-fpm #添加执行权限

chkconfig php-fpm on #设置开机启动


Search

    Table of Contents