MAC下安裝Brew[轉]


MAC下安裝Brew

1.安裝XCode

xcode-select --install

2.安裝HomeBrew

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

3.檢查homebrew是否有沖突等

brew doctor

4.更新Brew

sudo brew update
sudo brew upgrade

5.添加其它的源

brew tap homebrew/dupes
brew tap homebrew/php

添加后才可以安裝PHPFPM
6.安裝PHP示例

brew install --without-apache --with-fpm --with-mysql php56

7.設置用戶安裝的程序的環境變量

# 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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM