>백엔드 개발 >PHP 튜토리얼 >nginx调整php-fpm

nginx调整php-fpm

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB원래의
2016-06-13 11:03:47950검색

nginx整合php-fpm

tar -zxvf php-5.4.9.tar.bz2cd php-5.4.9./configure --prefix=/usr/local/php --enable-fpmmake make installcp php.ini-production /usr/local/php/etc/php.inicp /usr/local/php/etc/php-fpm.conf.default  /usr/local/php/etc/php-fpm.conf#php.ini 配置时区vim /usr/local/php/etc/php.inidate.timezone=Asia/Shanghai#php-fpm.ini 配置目录,工作用户vim /usr/local/php/etc/php-fpm.iniaccess.log = /home/fansxnet/wwwroot/phpwww/logs/$pool.access.logslowlog = /home/fansxnet/wwwroot/phpwww/logs/$pool.log.slowuser = fansxnetgroup = fansxnet#/home/fansxnet/wwwroot/phpwww 目录文件夹列表htdocs  include  logs  templates#在htdocs目录中新建一个index.phpecho phpinfo()#nginx.conf的配置添加一个location ~ \.php$ {            root           /home/fansxnet/wwwroot/phpwww/htdocs;            fastcgi_pass   127.0.0.1:9000;            fastcgi_index  index.php;            fastcgi_param  PHP_VALUE 'include_path=/home/fansxnet/wwwroot/phpwww/include:/user/share/pear';            fastcgi_param  SCRIPT_FILENAME  /home/fansxnet/wwwroot/phpwww/htdocs$fastcgi_script_name;            include        fastcgi_params;}#启动nginx  php-fpm/usr/local/openresty/nginx/sbin/nginx/usr/local/php/sbin/php-fpm -c /usr/local/php/etc/php.ini#浏览 http://localhost/index.php#添加模块指定扩展模块目录vim /usr/local/php/etc/php.iniextensioin_dir = "/usr/lib64/php/modules"#curl modulecd php-5.4.9/ext/curlphpize./configure --with-php-config=/usr/local/php/bin/php-config --with-curl=/usr/binmake make installvim /usr/local/php/etc/php.iniextension=curl.so # 添加curl 
?

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.