天天看点

Centos6安装nginx + uwsgi + php-fpm[nginx/1.10.2]

    #yum install nginx.x86_64 -y

    #/usr/sbin/nginx  -c /etc/nginx/nginx.conf -t       //提示端口绑定失败

        [ro[email protected] ~]# /usr/sbin/nginx  -c /etc/nginx/nginx.conf -t

        nginx: the configuration file /etc/nginx/nginx.conf syntax is ok

        nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)

        nginx: configuration file /etc/nginx/nginx.conf test failed

    #vi /etc/nginx/conf.d

    ##listen       [::]:80 default_server;       //注释掉这行,服务器不支持ipv6

    #/usr/sbin/nginx  -c /etc/nginx/nginx.conf      //启动nginx

    #yum install uwsgi.x86_64 -y        //安装uwsgi

    #vi /etc/uwsgi.d/uwsgi-admin-sou.conf    //添加一个project的配置

        [uwsgi]

        #socket = /tmp/uwsgi-admin-sou.sock

        socket = 127.0.0.1:8086

        chdir = /data/souProj

        wsgi-file = sou/wsgi.py

        touch-reload = /data/souProj/reload

        processes = 1

        threads = 2

        chmod-socket = 664

        chown-socket = uwsgi:uwsgi

        vacuum = true

    #/usr/sbin/uwsgi --ini /etc/uwsgi.d/uwsgi-admin-sou.conf

    #yum install php-fpm.x86_64 -y       //安装php-fpm

    #groupadd  nginx                                                                   //linux添加用户|组

    #useradd  -M  -s /sbin/nologin  -g nginx nginx        //linux添加用户|组

    #/usr/sbin/php-fpm -y /etc/php-fpm.d/crm.conf  -D

继续阅读