婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識庫 > centos6.6 下 安裝 php7 + nginx環境的方法

centos6.6 下 安裝 php7 + nginx環境的方法

熱門標簽:廈門防封電銷電話卡 宜賓銷售外呼系統軟件 地圖標注能更改嗎 地圖標注員有發展前景嗎 高德地圖標注公司需要錢 外呼系統全國 四川保險智能外呼系統 濰坊寒亭400電話辦理多少錢 云南電商智能外呼系統哪家好

本文實例講述了centos6.6 下 安裝 php7 + nginx環境的方法。分享給大家供大家參考,具體如下:

1、安裝必要的依賴庫

> yum -y install gd zlib libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel openssl openssl-devel curl-devel libxslt-devel

2、下載php源碼包

http://php.net/downloads.php

文件名為:php-7.0.4.tar.gz

3、解壓源碼包

> tar -zxvf php-7.0.4.tar.gz

4、進入目錄,并configure

./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

5、make && make install

> make && make install

6、配置文件

> 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

(*需要創建init.d目錄)

7、啟動

> /data/nmp/php/etc/init.d/php-fpm

8、nginx整合php

> vi /data/nmp/nginx/conf/nginx.conf

server {
  listen    80;
  server_name localhost;
 
  charset utf-8;
 
  #root網站的目錄
  location / {
    root  /data/wwwroot;
    index index.html index.htm index.php;
  }
 
  location ~ \.php$ {
 
    #網站目錄
    root      /data/wwwroot;
    #phpcgi端口,默認9000
    fastcgi_pass  127.0.0.1:9000;
    fastcgi_index index.php;
 
    #document_root指向的就是網站目錄
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include    fastcgi_params;
  }
}

9、重新加載nginx

> /data/nmp/nginx/sbin/nginx -s reload

希望本文所述對大家centos環境配置有所幫助。

標簽:紅河 德州 回訪 廣安 滁州 巴彥淖爾 廊坊 湛江

巨人網絡通訊聲明:本文標題《centos6.6 下 安裝 php7 + nginx環境的方法》,本文關鍵詞  centos6.6,下,安裝,php7,nginx,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《centos6.6 下 安裝 php7 + nginx環境的方法》相關的同類信息!
  • 本頁收集關于centos6.6 下 安裝 php7 + nginx環境的方法的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 左权县| 邯郸市| 榆中县| 合阳县| 门源| 海盐县| 惠来县| 万源市| 巴塘县| 砀山县| 霸州市| 晋州市| 南乐县| 台南市| 岳阳市| 海丰县| 东阿县| 莱芜市| 邯郸市| 隆化县| 仙居县| 昌黎县| 洞口县| 舞钢市| 房山区| 定边县| 高密市| 广平县| 安阳市| 襄汾县| 曲松县| 武平县| 兴宁市| 大港区| 海兴县| 兴化市| 闵行区| 尤溪县| 杭州市| 万荣县| 拜城县|