婷婷综合国产,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環境的方法的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 商城县| 绩溪县| 公安县| 台中县| 忻城县| 道真| 邵阳市| 澜沧| 三都| 兴化市| 兴文县| 永嘉县| 墨竹工卡县| 平南县| 休宁县| 恩平市| 安多县| 鄂托克前旗| 崇义县| 辛集市| 陆丰市| 清原| 青海省| 崇州市| 拉萨市| 景德镇市| 东丽区| 新营市| 芦溪县| 乐至县| 湟中县| 桐柏县| 米脂县| 德化县| 玉田县| 理塘县| 浦北县| 化州市| 涿鹿县| 稻城县| 仪征市|