mac ruby环境网络加速

HomeBrew 篇

解决的问题: 加速 brew install mysql 下载安装

github 时不时的网络中断,brew update经常不成功,更改git地址为中科大git源的地址

cd /usr/localgit remote set-url origin 
http://mirrors.ustc.edu.cn/homebrew.git
brew  update

Node 篇

NVM

更改nvm镜像地址,在 ~/.bashrc中添加

# nvmexport 
NVM_NODEJS_ORG_MIRROR=http://dist.u.qiniudn.com
source ~/git/nvm/nvm.sh

NPM

通过--registry
更改参数:

npm --registry=https://registry.npm.taobao.org install koa

你可能感兴趣的:(mac ruby环境网络加速)