mac安装lnmp环境

参考教程

安装brew

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 

安装PHP5.6

brew install php56 \ 
--without-snmp \ 
--without-apache \ 
--with-fpm \ 
--with-intl \ 
--with-homebrew-curl \ 
--with-homebrew-libxslt \ 
--with-homebrew-openssl \ 
--with-imap \ 
--with-mysql \ 
--with-tidy` 

不要用–without-debug方式安装 否则会造成php扩展模块编译后与php不兼容

修改系统环境

在~/.bash_profile中添加环境

export PATH="/usr/local/bin:/usr/local/sbin:$PATH" 

安装php56扩展

brew install php56-gearman php56-msgpack php56-memcache php56-memcached php56-mongo  php56-phalcon php56-redis php56-xdebug 

安装nginx

brew install nginx 

剩下的请去原博文 进行查看 只需要注意 编译的时候不要用debug模式编译