-
安装nvm
1.1 执行以下命令
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash
或者
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash
1.2 执行source ~/.bashrc
-
更换nvm源为淘宝镜像,执行以下命令
export NVM_NODEJS_ORG_MIRROR=http://npm.taobao.org/mirrors/node
export NVM_IOJS_ORG_MIRROR=http://npm.taobao.org/mirrors/iojs
source ~/.bashrc
测试版本为centos7.2,更多配置详见nvm-sh
网友评论