美文网首页
Mac 安装Nginx

Mac 安装Nginx

作者: 海绵宝宝LLL | 来源:发表于2019-08-19 17:27 被阅读0次

安装工具

homebrew

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

将以上命令粘贴至终端执行。

安装步骤

打开终端,执行命令
  brew update
  brew search nginx
  brew info nginx     //查看本地nginx相关信息


not installed 未安装

  brew install nginx     //正式安装
  open /usr/local/etc/nginx/     //查看nginx安装目录


安装目录
  open /usr/local/Cellar/nginx     //这个是nginx真正的安装目录
  cd 1.17.3     //进入目录,不同版本目录名不一致,一般以版本命名
  niginx     //启动nginx

访问验证

  浏览器访问localhost:8080


访问成功

相关文章

网友评论

      本文标题:Mac 安装Nginx

      本文链接:https://www.haomeiwen.com/subject/tsypdctx.html