1、打开终端
2、安装Command Line tools
xcode- select --install
|
3、安装brew命令
1
|
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
4、安装nginx
1
|
brew install nginx |
5、启动nginx
1
|
sudo nginx |
OK, nginx就安装好了,可以在浏览器访问了,默认端口为8080,