For a habit of using the Ubuntu terminal on the Apt-get to install the tool software, I also hope to find similar tools on the Mac, a very convenient command to install the required software, instead of manually to find the download compile, or toss the installation of some of the dependencies required. It's a surprise to find that there are similar tool package managers on Mac-Homebrew.
Homebrew is not a package can be installed, it can only install some system default software packages, such as: wget, Nginx, MySQL and so on. However, with the new tap operation in version homebrew0.9, software packages for installing third-party data sources are supported, and the packages that support installation will be more and richer later.
Homebrew Installation
Installing the Homebrew is simple, just enter a line of Ruby script on the terminal (so build the Ruby runtime environment, Ruby is preinstalled on your Mac):
1 |
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" |
Homebrew use
Homebrew and Ubuntu in the same apt-get, update is the list of updates package, install installs the package, uninstall is to uninstall the package, usage is similar, familiar with Apt-get use is very easy to get started.
Here are some common operations for Homebrew (the package is replaced with the name of the software you want to install, such as Nginx, MySQL, you can install the software you want to install properly):
Display Help information
Version of Homebrew
List homebrew suggestions or warning messages
List installed Packages
Update Homebrew Package
Open the Package home page with a browser (the package is empty to open the Homebrew home page)
displaying package content information
Show Package dependencies
Find out if you want to install a package (Fuzzy Lookup support)
To view information about a package
Installation options for packages
Install packages
If you want to see the commands executed during the installation or compile information, you can add a "-V" parameter after "install":
Uninstalling packages
1 |
brew uninstall(remove) package |
Install third-party tool packages with Homebrew, such as installing the official default PHP with Homebrew
1 |
brew tap josegonzalez /php |
If a new version of the package is available, you can update the outdated packages with upgrade (the default package parameter is all updates):
To clean up older versions of the data that were previously installed:
12 |
brew cleanup --force -s rm -rf $(brew --cache) |
More detailed usage instructions can be viewed in the terminal input "man brew".
Ps:mac Software management tools like Homebrew also have MacPorts, Fink.
Some configuration directories for Homebrew:
- /library/caches/homebrew: Where to install the downloaded files
Package Manager similar to Apt-get under MAC system--Homebrew