[Http://www.cnblogs.com/redirect/p/6131642.html]
1. Introduction Brew is a software package management tool similar to the Apt-get under CentOS or under Ubuntu, which is very convenient, eliminating the inconvenience of manually compiling and installing the installation directory/usr/local/cellar brew configuration directory/usr/ LOCAL/ETC Brew Command Directory/usr/local/bin Note: Homebrew automatically adds a soft connection to the/usr/local/bin after the installation is complete, so it is common to use this path 2. Installation and basic use installation methods: Ruby-e "$ (Curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install)" Common commands:brew update #更新brew可安装包, it is recommended to execute brew search php55 every time #搜索php5 .5brew tap josegonzalez/php #安装扩展 <gihhub_user/repo> , You can get more resources brew tap #查看安装的扩展列表brew install php55 #安装php5 .5brew remove php55 #卸载php5 .5brew upgrade php55 #升级php5 .5brew options php55 #查看php5.5 Mounting Options Brew info php55 # View php5.5 Related Information brew home php55 #访问php5.5 official website brew services list #查看系统通过 brew installation of service brew services cleanup #清除已卸载无用的启动配置文件brew services restart php55 #重启php-fpm3. Replace homebrew Mirror Source (choose it yourself) Because homebrew above the thing many either by the wall, or dead slow, need to change the brew source (divided into two parts) Replace homebrew default source CD "$ (Brew--repo)"//This command will go into the corresponding directory, can pwd view the next CD "$ (Brew --repo) "Git remote Set-url origin git://mirrors.ustc.edu.cn/brew.githomebrew bottles source (binary code package) echo ' Export Homebrew_bo Ttle_domain=https://mirrors.ustc.edu.cn/homebrew-bottles ' >> ~/.bash_profile source ~/.bash_profile Update Brew Update
4.brew another solution to the wall because brew is a global agent, we only need to add the proxy configuration to the current environment. I jumped out of the software is shadowsocks (do not know Baidu can), of course, if you choose the above source of the operation, you can ignore here just enter export all_proxy=socks5://127.0.0.1:1080 on the command line if you want to , write it in the config file, if your terminal is the default bash is written in ~/.bash+profile, Echo export all_proxy=socks5://127.0.0.1:1080 >> ~/.bash_ Profile if your terminal is zsh, then write in ~/.ZSHRC Echo export all_proxy=socks5://127.0.0.1:1080 >> ~/.zsh_profil But the downside is, You may be using proxies for most of your terminal's commands.
Mac Raiders (3)--Brew use