PersonalM 2019-07-01
Homebrew
是Mac
系统的软件包管理工具,其功能类似Centos
中的yum
。
64
位的Intel CPU
macOS 10.12
或者更高版本的操作系统Xcode
命令行工具(安装方法:xcode-select --install
)bourne bash
兼容的shell
,例如bash
或者zsh
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
需要注意这个指令除了会更新Homebrew
外也会更新使用Homebrew
安装的包
brew update
Homebrew
安装软件:brew install wget
Homebrew
卸载软件:brew uninstall wget
Homebrew
更新软件(Homebrew
也会更新):brew upgrade wget
Homebrew
安装的软件:brew list
Homebrew
安装的软件信息:brew info wget
Homebrew
软件库:brew search wget
Homebrew
问题:brew doctor
在Centos
中有个管理后台运行的服务的工具systemctl
而在Mac
中可以使用brew services
来代替其(Mac
中没有systemctl
)
brew services
运行中服务:brew services list
brew services cleanup
brew services run nginx
brew services start nginx
brew services stop nginx
brew services restart nginx