PHP

PHP编译:

tar -zxvf php-5.5.14.tar.gz

cd php-5.5.14

./configure --enable-fpm --prefix=/usr/local/php-5.5.14 --with-mysql --with-apxs2=/usr/local/httpd-2.2.27/bin/apxs --without-iconv


PHP模块编译:

cd {模块目录}

/usr/local/php-5.5.14/bin/phpize

configure --with-php-config=/usr/local/php-5.5.14/bin/php-config

make -j 2

sudo make install


然后在 php.ini 中加入extention = ***.so


NGINX配置:

http {
    
    server {
        listen 8080;


        location ~ \.php$ {
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME /usr/local/httpd-2.2.27/htdocs$fastcgi_script_name;
            include fastcgi_params;


            fastcgi_pass 127.0.0.1:9000;
            add_header SCRIPT_FILENAME /usr/local/httpd-2.2.27/htdocs$fastcgi_script_name;
            add_header URI $uri;
        }


        location / {
            return 200 "hello\n";
        }
   }


}


你可能感兴趣的:(PHP)