1、安装Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
期间需要输入mac密码
进度条结束就OK啦
2、安装nginx
brew install nginx
3、验证结果
brew services start nginx
重启
brew services restart nginx
关闭
brew services stop nginx