From: http://www.xiaoche.me/blog/2012/02/01/homebrew-install/
Homebrew, as a powerful Package Manager on OS X, provides a very convenient installation method for system software. It uniquely solves the problem of package dependency and eliminates the need for annoying sudo, one-click compilation, no parameter troubles. Really, you deserve it.
Install
Homebrew depends on xcode and needs to be installed first. After lion, xcode is free of charge and can be downloaded directly from the App Store. Homebrew also depends on Ruby, and Mac already comes with Ruby.
ruby -e "$(curl -fsSLk https://gist.github.com/raw/323731/install_homebrew.rb)"
Use
- View brew help
brew --help
- Install software
brew install git
- Uninstall Software
brew uninstall git
- Search software
brew search git
- Displays the list of installed software
Brew list
Update the software, update all the formula directories, and mark the software installed and updated on the local machine.
Brew update
Update a specific software
Brew upgrade git
View Software Information
Brew [info | Home] [formula...]
Delete A program. Like upgrade, a single software is deleted and all old versions of the program are deleted.
Brew cleanup git
Brew cleanup
View the installed programs that need to be updated
Brew outdated
Installation path and folder
Homebrew initializes the local/usr/local to the GIT work tree and changes the directory owner to the user currently being operated. sudo is not required for future operations.
-Bin is used to store the startup link of the installed program (equivalent to a shortcut)
-Cellar, brew installed programs will be stored in the local directory with the [program name/version number]
-Default storage path of the configuration file of the ETC brew Installer
-Library homebrew system folder
+-Storage location of the formula program's download path, compilation parameters, installation path, and other configuration files
+-Homebrew brew program command set