Brew is a package management tool under MAC, similar to the Yum under CentOS, it is easy to install/uninstall/update various software packages, such as: Nodejs, Elasticsearch, Kibana, MySQL, MongoDB and so on, can be used to quickly build Various local environments, programmer-required tools
Installing Brew
First, install brew with the following command
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Basic usage Install/uninstall/update
Take Nodejs as an example, execute the following command, the installation directory/usr/local/Cellar
brew install nodejs
If you need to update or uninstall
brew upgrade nodejsbrew remove nodejs
Other commands
brew list # 列出当前安装的软件brew search nodejs # 查询与 nodejs 相关的可用软件brew info nodejs # 查询 nodejs 的安装信息
If you need to specify a version, you can view the version that you brew search
want, @
later specify the version number, for examplebrew install [email protected]
Brew Services
brew services
is a very powerful tool that can be used to manage the start and stop of various services, a bit like the services in Linux, very convenient, take elasticsearch as an example
brew install elasticsearch # 安装 elasticsearchbrew services start elasticsearch # 启动 elasticsearchbrew services stop elasticsearch # 停止 elasticsearchbrew services restart elasticsearch # 重启 elasticsearchbrew services list # 列出当前的状态
Brew Services Service-related configuration and log path
- To configure the path:
/usr/local/etc/
- Log path:
/usr/local/var/log
Reference links
- Brew Official Website: https://brew.sh/
Reprint please indicate the source
This article link: http://hatlonely.github.io/2018/02/21/mac-necessary tools of the-brew/
Brew of MAC Essentials tools