MAC OS X 编译安装PHP7.0.16
主要内容包括:php7以上版本的编译,安装,php-fpm配置。
下载源代码
下载地址:http://www.php.net/downloads.php
安装
编译源码
-
从压缩包解压,得到源码。复制到:
/usr/local/src/
目录 -
执行
cd /usr/local/src/php-7.x.x
-
执行
./buildconf --force
-
执行
./configure --prefix=/usr/local/php/php7 \ --with-config-file-path=/usr/local/php/php7/etc \ --with-config-file-scan-dir=/usr/local/php/php7/etc/conf.d \ --enable-bcmath \ --with-bz2=/usr/local/opt/bzip2 \ --with-curl=/usr/local/opt/curl \ --enable-filter \ --enable-fpm \ --with-gd \ --enable-gd-native-ttf \ --with-freetype-dir \ --with-jpeg-dir \ --with-png-dir \ --enable-intl \ --enable-mbstring \ --with-mcrypt \ --enable-mysqlnd \ --with-mysql-sock=/tmp/mysql.sock \ --with-mysqli=mysqlnd \ --with-pdo-mysql=mysqlnd \ --with-pdo-sqlite \ --with-zlib-dir=/usr/local/opt/zlib \ --with-iconv=/usr/local/opt/libiconv \ --with-icu-dir=/usr/local/opt/icu4c \ --disable-phpdbg \ --disable-phpdbg-webhelper \ --enable-opcache \ --with-openssl=/usr/local/Cellar/openssl/1.0.2n \ --enable-simplexml \ --with-sqlite3 \ --enable-xmlreader \ --enable-xmlwriter \ --enable-zip \ --enable-sockets \ --with-xmlrpc
编译配置中&