mac 上面能够直接使用 homebrew 来安装,直接执行 brew install nginx
,通常来讲就能够直接自动安装完成了。毫无压力。nginx
若是你不幸像我同样遇到各类报错,恭喜!请继续看!ui
个人解决方式 - 按照这个路径来手动建立这个 Cellar 文件code
个人解决方式 - 执行 /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
,手动设置一下配置文件。若是执行了无效,按照这个路径,新建好这个文件,再执行一次。进程
个人解决方式 - 执行 brew link pcre
homebrew
nginx
it
nginx -s quit
kill all
systemctl start nginx.service
nginx -s reload
配置
ps aux | grep nginx