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
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!