centos6.6 下 安裝 php7 + nginx環(huán)境的方法

> tar -zxvf php-7.0.4.tar.gz./configure --prefix=/data/nmp/php \--with-curl \--with-freetype-dir \--with-gd \--with-gettext \--with-iconv-dir \--with-kerberos \--with-libdir=lib \--with-libxml-dir \--with-mysqli=mysqlnd \--with-openssl \--with-pcre-regex \--with-pdo-mysql=mysqlnd \--with-pdo-sqlite \--with-pear \--with-png-dir \--with-xmlrpc \--with-xsl \--with-zlib \--enable-mysqlnd \--enable-fpm \--enable-bcmath \--enable-libxml \--enable-inline-optimization \--enable-gd-native-ttf \--enable-mbregex \--enable-mbstring \--enable-opcache \--enable-pcntl \--enable-shmop \--enable-soap \--enable-sockets \--enable-sysvsem \--enable-xml \--enable-zip \--enable-pthreads \--enable-maintainer-zts \--enable-fileinfo> make && make install> cp php.ini-development /data/nmp/php/lib/php.ini> cp /data/nmp/php/etc/php-fpm.conf.default /data/nmp/php/etc/php-fpm.conf> cp /data/nmp/php/etc/php-fpm.d/www.conf.default /data/nmp/php/etc/php-fpm.d/www.conf> cp -R ./sapi/fpm/php-fpm /data/nmp/php/etc/init.d/php-fpm> /data/nmp/php/etc/init.d/php-fpm> vi /data/nmp/nginx/conf/nginx.confserver { ?listen ???80; ?server_name localhost; ??charset utf-8; ??#root網(wǎng)站的目錄 ?location / { ???root ?/data/wwwroot; ???index index.html index.htm index.php; ?} ??location ~ \.php$ { ????#網(wǎng)站目錄 ???root ?????/data/wwwroot; ???#phpcgi端口,默認(rèn)9000 ???fastcgi_pass ?127.0.0.1:9000; ???fastcgi_index index.php; ????#document_root指向的就是網(wǎng)站目錄 ???fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; ???include ???fastcgi_params; ?}}> /data/nmp/nginx/sbin/nginx -s reload希望本文所述對(duì)大家centos環(huán)境配置有所幫助。
了解更多網(wǎng)絡(luò)知識(shí)關(guān)注:http://www.vecloud.com/