1. 安装brew
/bin/bash -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install.sh)"
注:网上搜的其他镜像不好用,这个可
2. 安装nginx
sudo brew install nginx
3. 启动nginx
sudo brew services start nginx
4. 常用命令
安装:brew install nginx/sudo brew install nginx
启动:brew services start nginx/sudo brew services start nginx
重启:brew services restart nginx/sudo brew services restart nginx
停止:brew services stop nginx/sudo brew services stop nginx
查看:cat usr/local/etc/nginx/nginx.conf
编辑:vi usr/local/etc/nginx/nginx.conf
保存编辑并退出:先按ESC键跳到命令模式然后 :wq