mac 安装神器brew

前言

今天安装zookeeper时使用的是brew方式来安装,才深深的体会到brew的厉害之处,闲话少叙,进入正题。

brew的使用

1. 安装brew

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

在1中指令回车之后,会提示Press RETURN to continue or any other key to abort (回车继续或者按其他键终止),这是直接回车进入“Downloading and installing Homebrew…”,如果网络不好的话可能会提示“fatal: unable to access ‘https://github.com/Homebrew/brew/‘: SSLRead() return error -9806…等”,没关系重新输入1的指令更新。

安装完成之后会有如下提示:

HEAD is now at 2b6f47714 Merge pull request #4116 from commitay/zap-force
==> Cleaning up /Library/Caches/Homebrew...
==> Migrating /Library/Caches/Homebrew to /Users/maerfeifei/Library/Caches/Homeb
==> Deleting /Library/Caches/Homebrew...
Already up-to-date.
==> Installation successful!

==> Homebrew has enabled anonymous aggregate user behaviour analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics.html

==> Next steps:
- Run `brew help` to get started
- Further documentation: 
    https://docs.brew.sh

2. brew 常用命令(SoftwareName是你需要处理的软件的软件名)

  1. 查看软件最新版本,brew info SoftwareName例如
192:~ maerfeifei$ brew info zookeeper
  1. 安装软件,brew install SoftwareName例如
 192:~ maerfeifei$ brew install zookeeper
  1. 卸载软件:rew remove SoftwareName例如
 192:~ maerfeifei$ brew remove zookeeper
  1. 查看通过brew安装的所有软件
brew list

查看某个软件的安装路径

brew list 软件名

你可能感兴趣的:(个人总结)