FastCGI的安装
1.源码编译安装php
成都创新互联公司主营通江网站建设的网络公司,主营网站建设方案,成都app软件开发公司,通江h5成都微信小程序搭建,通江网站营销推广欢迎通江等地区企业咨询
yum install libxml2-devel openssl-devel bzip2-devel -y
cd /usr/local/src tar zxvf php-5.4.13.tar.gz cd /usr/local/src/php-5.4.13 ./configure \ --prefix=/usr/local/php \ --enable-fpm \ --with-openssl \ --enable-mbstring \ --enable-sysvshm \ --with-config-file-path=/etc \ --with-config-file-scan-dir=/etc/php.d \ --with-bz2 --with-curl \ --enable-sockets \ --with-freetype-dir \ --with-jpeg-dir \ --with-png-dir \ --with-zlib-dir \ --with-libxml-dir=/usr \ --enable-xml \ --with-MySQL \ --with-mysqli make make test make install
2.为php提供配置文件:
cp php.ini-production /etc/php.ini
(1)为php-fpm提供Sysv init脚本,并将其添加至服务列表:
cp sapi/fpm/init.d.php-fpm /etc/rc.d/init.d/php-fpm chmod +x /etc/rc.d/init.d/php-fpm chkconfig --add php-fpm chkconfig php-fpm on
(2)为php-fpm提供配置文件:
cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
(3)编辑php-fpm的配置文件:
vim /usr/local/php/etc/php-fpm.conf 配置fpm的相关选项为你所需要的值,并启用pid文件(如下最后一行):
pm.max_children = 150 pm.start_servers = 8 pm.min_spare_servers = 5 pm.max_spare_servers = 10 pid = /usr/local/php/var/run/php-fpm.pid
3.启动php-fpm
service php-fpm start
4.查看php-fpm后台进行
ps aux | grep php-fpm | grep -v "grep"
网页名称:FastCGI的安装
标题链接:http://scyanting.com/article/gsjhpj.html