点击了解 CRMEB多商户
其他开源项目源码 :了解更多
小姐姐二维码
mac brew 的安装相关笔记
一. 安装 / 卸载 brew
:
- 执行安装命令
如果报错:ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
原因是:不是第一次安装,或者已经卸载了,就执行下面的命令Warning: The Ruby Homebrew installer is now deprecated and has been rewritten in Bash. Please migrate to the following command: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to raw.githubusercontent.com:443
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- 卸载
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
二. brew
更换镜像地址
- 替换brew.git:
cd "$(brew --repo)" git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
- 替换homebrew-core.git:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
- 重置brew.git:
cd "$(brew --repo)" git remote set-url origin https://github.com/Homebrew/brew.git
- 重置 homebrew-core.git:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" git remote set-url origin https://github.com/Homebrew/homebrew-core.git
- 修改完后执行
brew update
三. 常用命令
# {name} 就是服务名称 比如 mysql
brew update #更新
brew search {name} #查找
brew install {name} #安装
brew update #更新
brew services start/restart/stop {name} #启动/重启/停止
brew commands #查看命令
五. 例如安装 mysql
-
搜索资源
brew search mysql
-
安装需要安装的资源
brew install mysql@5.7
-
查看
brew services list
,显示所有通过brew安装的软件
-
启动服务
brew services restart mysql@5.7