zoukankan      html  css  js  c++  java
  • 结合Nginx以cgi方式安装php5.5.4

    新建用户及用户组
    groupadd webuser
    useradd -g webuser webuser

    下载php-5.5

    下载链接:http://pan.baidu.com/s/1i3CBshv

    解包
    tar zxvf php-5.5.4.tar.gz
    cd php-5.5.4

    ./configure --prefix=/server/php5
    --with-mysql=/server/mysql
    --with-mysqli
    --with-jpeg-dir=/usr/lib64
    --with-gd
    --with-curl
    --enable-mbstring=all
    --with-config-file-path=/server/php5/etc
    --enable-force-cgi-redirect
    --enable-soap
    --enable-fastcgi
    --enable-fpm

    编译 并 安装
    make && make install

    cp ./php.ini-production /server/php5/etc/php.ini

    编辑include_path
    vi  /server/php5/etc/php.ini
    include_path = ".:/php/includes:/server/php5/lib/php"
    cgi.fix_pathinfo=1
    date.timezone = Asia/Shanghai

    配置php-fpm
    vi /server/php5/etc/php-fpm.conf
    <value name="user">webuser</value>
    <value name="group">webuser</value>

    可以启动 php-fpm了
    /server/php5/sbin/php-fpm start

    编辑 nginx.conf
    location ~ .php$ {
    root           /web/xinfilm;
    fastcgi_pass   127.0.0.1:9000;
    fastcgi_index  index.php;
    fastcgi_intercept_errors on;
    error_page 404 /404.html;
    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    include        fastcgi_params;
    }

    重启Nginx完成配置
    /server/nginx/sbin/nginx -s restart

  • 相关阅读:
    java微信小程序调用支付接口
    Java开发中的23种设计模式详解(转)
    SSM框架-SpringMVC 实例文件上传下载
    设计模式--观察者模式
    设计模式之策略模式
    网络通讯简单了解
    android 五子棋开发
    android studio里的build.gradle基本属性
    android studio 真机调试
    java线程知识点
  • 原文地址:https://www.cnblogs.com/yjken/p/3921993.html
Copyright © 2011-2022 走看看