Mac 使用自带的Ruby 安装brew

Homebrew简称brew,OSX上的软件包管理工具,在Mac终端可以通过brew安装、更新、卸载软件。

首先要安装brew,在 mac 中使用finder 搜索 终端(terminal)打开命令行,

brew的安装方法:(由于MAC自带ruby,所以安装起来极其轻松)

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

安装后命令存在 /usr/local/bin/brew

之后 输入 输入 brew install   xxx,就可以安装  xx软件了

例如 输入 brew install nginx  安装 nginx。

   输入 brew install apche2 安装 apche2 (apache 在brew中是httpd)。

原文地址:https://www.cnblogs.com/1175429393wljblog/p/8275941.html