记录一下在Mac安装nginx
安装之前可以看一看自己的机器上是否已安装,在命令行输入ps -ef | grep nginx,出现: 0 21608 1 0 3:27PM ?? 0:00.00 nginx: master process nginx -2 21609 21608 0 3:27PM ?? 0:00.00 nginx: worker process 501 21611 13581 0 3:28PM ttys001 0:00.00 grep nginx 没装的话就只有最后一行了 先安装brew,运行 brew -v 检查, 安装好了的话会有类似显示: Homebrew 2.2.6 Homebrew/homebrew-core (git revision 6bc24; last commit 2020-02-20) 此时我的机器上还什么都没有,网上找了下安装过程: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install) brew install nginx 不过不幸的是ruby这行运行就报错了: curl: (7) Failed to connect to raw.githubusercontent.com port 443: Operation 百度到了解决方法(摘自 CSDN博主