##mac安装神器brew
安装方法:命令行输入 /usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)” 回车(这里有提示目录不存在,要创建需要按return键,如果用的windows键盘,就是回车键)
命令 | 作用 |
---|---|
brew update | #更新brew可安装包,建议每次执行一下 |
brew search php55 | #搜索php5.5 |
brew tap josegonzalez/php | #安装扩展gihhub_user/repo ,可以获得更多的资源 |
brew tap | #查看安装的扩展列表 |
brew install php55 | #安装php5.5 |
brew remove php55 | #卸载php5.5 |
brew upgrade php55 | #升级php5.5 |
brew options php55 | #查看php5.5安装选项 |
brew info php55 | #查看php5.5相关信息 |
brew home php55 | #访问php5.5官方网站 |
brew services list | #查看系统通过 brew 安装的服务 |
brew services cleanup | #清除已卸载无用的启动配置文件 |
brew services restart php55 | #重启php-fpm |
##bash-completion
####安装bash-completion
brew install bash-completion
brew tap
brew info bash-completion
####写脚本
vim ~/.bash_profile
把下面这些代码写到进.bash_profile
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
执行下面命令
cd /usr/local/opt/bash-completion/etc/bash_completion.d
curl -L -O https://raw.github.com/git/git/master/contrib/completion/git-completion.bash
brew unlink bash-completion
brew link bash-completion
重启终端就可以了