php7安裝intl擴充的方法:1、下載icu源碼包;2、解壓縮icu及編譯安裝;3、下載並解壓縮php包;4、進入php解壓縮包目錄下,編譯安裝;5、設定檔及啟動檔即可。
本文操作環境:Windows7系統、php7.0.8版、DELL G3電腦
#1.1)下載icu原始碼套件
wget http://download.icu-project.org/files/icu4c/52.1/icu4c-52_1-src.tgz
1.2)解壓縮icu及編譯安裝
tar -zxf icu4c-52_1-src.tgz mkdir /usr/local/icu cd icu/source ./configure --prefix=/usr/local/icu make && make install
2.1)yum 依賴套件
yum -y install gcc-c gd libxml2-devel libjpeg-devel libpng-devel net- snmp-devel curl-devel libxslt-devel pcre-devel libjpeg libpng libxml2 libcurl4-openssl-dev libcurl-devel libcurl libmysqlclient freetype-config freetype#freetype-devel ununfm.套件
http://php.net/downloads.php 套件下載位址
tar -zxf php-7.0.8.tar.gz
2.3)進入php解壓縮套件目錄下,編譯安裝
cd php-7.0.8
./configure --prefix=/usr/local/php708 --with-curl --with-gd --with-gettext --with-iconv-dir --with-kerberos --with-libdir= lib64 --with-libxml-dir --with-mysql --with-mysqli --with-openssl --with-pcre-regex --with-pdo-mysql --with-pdo-sqlite --with-pear - -with-png-dir --with-freetype-dir --with-jpeg-dir --with-xmlrpc --with-xsl --with-zip --with-zlib --enable-fpm --enable-bcmathath --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-intl --with-icu-dir=/usr/local/icu
make && make install# 2.4)設定檔及啟動檔
cp php.ini-development /usr/local/php708/lib/php.ini cp /usr/local/php708/etc/php-fpm.conf.default /usr/local/php708/etc/php-fpm.conf cp /usr/local/php708/etc/php-fpm.d/www.conf.default /usr/local/php708/etc/php-fpm.d/www.conf cp -R ./sapi/fpm/php-fpm /etc/init.d/php-fpm /etc/init.d/php-fpm
#推薦學習:《PHP影片教學
》以上是php7怎麼安裝intl擴展的詳細內容。更多資訊請關注PHP中文網其他相關文章!