mac10.9+php5.5.15+brew0.9.5的安装Brew 是 Mac 下面的包管理工具,通过 Github 托管适合 Mac 的编译配置以及 Patch,可以方便的安装开发工具。 Mac 自带ruby 所以安装起来很方便,同时它也会自动把git也给你装上。官方网站: http://brew.sh安装方法:?
1 | ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" |
使用以下方法可以查看brew是否安装成功,以及目前的版本:?
12 | liondeMacBook-PRo:~ lion$ brew - v Homebrew 0.9.5 |
添加brew的PHP扩展库:?
1234 | liondeMacBook-Pro:~ lion$ brew update liondeMacBook-Pro:~ lion$ brew tap homebrew /dupes liondeMacBook-Pro:~ lion$ brew tap homebrew /php liondeMacBook-Pro:~ lion$ brew tap josegonzalez /homebrew-php |
可以使用brew options php55命令查看安装时可以有哪些选项,因为我之前安装过curl、libxslt、openssl所以,在选项中会提示是否使用brew安装的相关扩展:?
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 | liondeMacBook-Pro:Library lion$ brew options php55 --disable-opcache
Build without Opcache extension --disable-zend-multibyte
Disable auto-detection of Unicode encoded scripts (PHP 5.2 and 5.3 only) --homebrew-apxs
Build against apxs in Homebrew prefix --with-apache
Enable building of shared Apache 2.0 Handler module, overriding any options which disable apache --with-cgi
Enable building of the CGI executable (implies --without-apache) --with-debug
Compile with debugging symbols --with-fpm
Enable building of the fpm SAPI executable (implies --without-apache) --with-gmp
Build with gmp support --with-homebrew-curl
Include Curl support via Homebrew --with-homebrew-libxslt
Include LibXSLT support via Homebrew --with-homebrew-openssl
Include OpenSSL support via Homebrew --with-imap
Include IMAP extension --with-intl
Include internationalization support --with-libMySQL
Include (old-style) libmysql support instead of mysqlnd --with-mssql
Include MSSQL-DB support --with-pdo-oci
Include Oracle databases (requries ORACLE_HOME be set ) --with-pgsql
Include PostgreSQL support --with-phpdbg
Enable building of the phpdbg SAPI executable (PHP 5.4 and above) --with-thread-safety
Build with thread safety --with-tidy
Include Tidy support --without-bz2
Build without bz2 support --without-mysql
Remove MySQL /MariaDB support --without-pcntl
Build without Process Control support --without-pear
Build without PEAR --HEAD
install HEAD version |
开始安装PHP5.5.15,安装后的php-fpm.ini以及php.ini都在目录:/usr/local/etc/php/5.5/下面?
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 | liondeMacBook-Pro:Library lion$ brew install php55 --with-mssql --with-homebrew-openssl --with-homebrew-libxslt --with-homebrew-curl --with-fpm --with-debug --with-gmp --with-imap --with-tidy --with-libmysql ==> Installing dependencies for php55: curl, freetds, gmp ==> Installing php55 dependency: curl ==> Downloading https: //downloads .sf.net /project/machomebrew/Bottles/curl-7 .37.1.mavericks.bottle. tar .gz ==> Pouring curl-7.37.1.mavericks.bottle. tar .gz ==> Caveats This formula is keg-only, which means it was not symlinked into /usr/local . Mac OS X already provides this software and installing another version in parallel can cause all kinds of trouble. Generally there are no consequences of this for you. If you build your own software and it requires this formula, you'll need to add to your build variables:
LDFLAGS: -L /usr/local/opt/curl/l
|