赞
踩
mac系统经常采用brew安装软件
1、判断mac电脑是否已安装brew
brew update
2、如果没有安装brew,可以进入官网安装,官网安装会走国外服务器,需要vpn,也可以用国内版本安装
官网地址:https://brew.sh/index_zh-cn.html
官网安装命令:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
国内版本:(根据提示选择安装下载镜像、执行脚本选择Y)
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
3、查询需要安装的nginx包是否存在
brew search nginx
4、安装nginx
brew install nginx
5、安装成功后,查看nginx安装目录
brew info nginx
服务目录:open /usr/local/var/www
配置目录:open /usr/local/etc/nginx
6、启动nginx,没有报错,则启动成功,打开浏览器,访问 http://localhost:8080/
nginx
7、nginx常用操作
重启:nginx -s reload
关闭:nginx -s stop
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。