安装 php + nginx 环境

来源:互联网 发布:鬼刀画册淘宝 编辑:程序博客网 时间:2024/05/18 20:09
1. 安装 pcre
    sudo yum install pcre

2. 安装 nginx
    sudo yum install nginx

3. 安装 PHP
    1) 安装 libpng
        sudo yum install libpng
    2) 安装 libfpeg
        not install suceed
    3) 安装 freetype
        sudo yum install freetype
    4) 安装 fontconfig
        sudo yum install fontconfig
    5) 安装 gd
        sudo yum install gd
    6) 安装fcgi
        sudo yum install fcgi.x86_64
    6) 安装 php
        sudo yum install php-fpm.x86_64

4. 配置:
1) nginx
default.conf
    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    location ~ \.php$ {
        root           html;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        #fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        fastcgi_param  SCRIPT_FILENAME  /usr/local/nginx/html$fastcgi_script_name;
        include        fastcgi_params;
    }

2) php-fpm
www.conf
listen = 127.0.0.1:9000


ref:http://www.jb51.net/article/26597.htm

0 0
原创粉丝点击