Mac  nginx  安装

1、安装brew命令

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

2、安装nginx

brew install nginx

3、启动nginx

sudo nginx

 

如果是重新安装 nginx

使用brew uninstall nginx卸载nginx,此时目录服务器上还留有nginx相关的文件,我们需要手动删除www、etc目录

删除配置文件:

/usr/local/etc/nginx 目录

然后继续 brew install nginx

 

 

nginx路径

nginx.conf => /usr/local/etc/nginx/nginx.conf

 

posted @ 2020-08-26 16:56  wzndkj  阅读(125)  评论(0编辑  收藏  举报