MAC下安裝Brew
1.安裝XCode
6.安裝PHP示例
xcode-select --install
2.安裝HomeBrewruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
3.檢查homebrew是否有沖突等brew doctor
4.更新Brewsudo brew update
sudo brew upgrade
5.添加其它的源sudo brew upgrade
brew tap homebrew/dupes
brew tap homebrew/php
添加后才可以安裝PHPFPMbrew tap homebrew/php
6.安裝PHP示例
brew install --without-apache --with-fpm --with-mysql php56
7.設(shè)置用戶安裝的程序的環(huán)境變量# If you use Bash
echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.bash_profile
. ~/.bash_profile
# If you use ZSH
echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc
. ~/.zshrc
echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.bash_profile
. ~/.bash_profile
# If you use ZSH
echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc
. ~/.zshrc