**1.使用Homebrew安装Nginx**
1 | brew install nginx |
出现mkdir: /usr/local/var/log/nginx: Permission denied问题
1 | sudo chown -R "$USER":admin /usr/local |
http://stackoverflow.com/questions/16432071/how-to-fix-homebrew-permissions
2.启动Nginx
1 | nginx |
然后在浏览器里输入localhost:8080,回车,出现welcome to nginx,说明成功
相关
安装Homebrew
1 | ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |