brew php7 intl_brew安装php7
設置brewbrew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
安裝php7brew install php70 \
--without-snmp \
--without-apache \
--with-debug \
--with-fpm \
--with-intl \
--with-homebrew-curl \
--with-homebrew-libxslt \
--with-homebrew-openssl \
--with-imap \
--with-mysql \
--with-tidy
configure的時候,報錯了:checking for ZLIB support... yes
checking if the location of ZLIB install directory is? ? defined... no
configure: error: Cannot find libz
安裝 xcode-selectxcode-select--install
安裝好了之后。繼續php7
配置文件目錄
php.ini/usr/local/etc/php/7.0/php.ini
php-fpm.conf/usr/local/etc/php/7.0/php-fpm.conf
php, phpize, php-conigls /usr/local/opt/php70/bin
phar? ? php? php-cgi? php-config? phpize
php-fpm/usr/local/opt/php70/sbin/php-fpm
測試
php版本?/usr/local/opt/php70/bin/php-v
PHP7.0.4(cli)(built:Mar15201615:40:41)(NTS)
Copyright(c)1997-2016ThePHPGroup
ZendEnginev3.0.0,Copyright(c)1998-2016ZendTechnologies
withZendOPcachev7.0.6-dev,Copyright(c)1999-2016,byZendTechnologies
withXdebugv2.4.0,Copyright(c)2002-2016,byDerickRethans
php-fpm版本PHP7.0.4(fpm-fcgi)(built:Mar15201615:40:46)
Copyright(c)1997-2016ThePHPGroup
ZendEnginev3.0.0,Copyright(c)1998-2016ZendTechnologies
withZendOPcachev7.0.6-dev,Copyright(c)1999-2016,byZendTechnologies
withXdebugv2.4.0,Copyright(c)2002-2016,byDerickRethans
啟動php-fpm
//刪掉老的sudo pkill php-fpm
//啟動新的sbin git:(master)/usr/local/opt/php70/sbin/php-fpm
[15-Mar-201616:58:06]NOTICE:[pool www]'user'directiveisignoredwhenFPMisnotrunningasroot
[15-Mar-201616:58:06]NOTICE:[pool www]'group'directiveisignoredwhenFPMisnotrunningasroot
[15-Mar-201616:58:06]NOTICE:fpmisrunning,pid43008
[15-Mar-201616:58:06]NOTICE:ready to handle connections
打開 index.php 里的phpinfo()看是否是php7.0.4版本了。
安裝擴展
redisbrew install php70-redis
配置文件:/usr/local/etc/php/7.0/conf.d/ext-redis.ini
memcachedbrew install php70-memcached
配置文件:/usr/local/etc/php/7.0/conf.d/ext-memcached.ini
swoolebrew install php70-swoole
配置文件:/usr/local/etc/php/7.0/conf.d/ext-swoole.ini
其他擴展類似這樣安裝。
總結
以上是生活随笔為你收集整理的brew php7 intl_brew安装php7的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: java 线程安全的原因_java的多线
- 下一篇: php求北京时间方法,php怎么将获得的