婷婷综合国产,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環境的方法的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 临洮县| 石柱| 云浮市| 宿州市| 安图县| 庆城县| 合山市| 舟山市| 门源| 海南省| 金塔县| 门源| 南木林县| 惠安县| 平湖市| 渭南市| 汾西县| 砚山县| 鄂伦春自治旗| 健康| 河池市| 安达市| 象山县| 昌宁县| 新和县| 嵊州市| 全南县| 河源市| 威信县| 隆林| 嘉义县| 贵南县| 班玛县| 孟津县| 丰镇市| 明光市| 涡阳县| 旬阳县| 五台县| 潜江市| 咸丰县|