以前整理了一下内置的php环境,各类缺库是很坑爹的,并且内置的php编译目录找了老半天没找到。因此决定使用brew去从新编译一边phpphp
brew的安装就不说了,上篇博客有说。直入主题mysql
brew安装完php后,切换默认使用redis
export PATH="$(brew --prefix homebrew/php/php55)/bin:$PATH"sql
export PATH="/usr/local/mysql/bin:$PATH"swoole
export PATH="/usr/local/sbin:$PATH"debug
在我以前我已经用pecl安装过memcache,和redis,swoole了orm
如今换了php版本后要从新加载进来。homebrew
php --ini ip
sudo vi /usr/local/etc/php/5.5/php.ini博客
extension=/usr/lib/php/extensions/no-debug-non-zts-20121212/memcache.so
extension=/usr/lib/php/extensions/no-debug-non-zts-20121212/redis.so
extension=/usr/lib/php/extensions/no-debug-non-zts-20121212/swoole.so
zend_extension=/usr/lib/php/extensions/no-debug-non-zts-20121212/opcache.so
opcache.enable=1
opcache.enable_cli=1
ImageMagick安装
brew install php55-imagick
出现:
Error: Formulae found in multiple taps:
* homebrew/php/php55-imagick
* josegonzalez/php/php55-imagick
Please use the fully-qualified name e.g. homebrew/php/php55-imagick to refer the formula.
没找到这个库,网上解决方案,重置brew库
brew untap josegonzalez/homebrew-php
brew install php55-imagick
这下成功了。