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

相关文章:

  • 2021-08-20
  • 2021-12-12
  • 2022-03-01
  • 2022-02-07
  • 2021-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-19
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案