nodejs yum源


NodeJS 11.x
curl -sL https://rpm.nodesource.com/setup_11.x | bash -

NodeJS 10.x
curl -sL https://rpm.nodesource.com/setup_10.x | bash -

NodeJS 8.x
curl -sL https://rpm.nodesource.com/setup_8.x | bash -

NodeJS 6.x
curl -sL https://rpm.nodesource.com/setup_6.x | bash -

nodejs 多版本管理

#安装
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
#查看所有版本
nvm ls-remote
#安装最新版
nvm install stable
nvm install v8.15.0
nvm install v10.15.0
#查看已安装的版本
nvm list
#切换版本
nvm use v10.15.0
#设置别名
nvm alias 10 v10.15.0
#设置默认版本
nvm alias default v8.15.0