#安装github
yum install git -y
#下载nvm
git clone git://github.com/creationix/nvm.git ~/nvm
#设置nvm 自动运行;
echo "source ~/nvm/nvm.sh" >> ~/.bashrc
source ~/.bashrc
#查询node版本
nvm list-remote
#安装node.js
nvm install v6.0.0
#使用nodejs
nvm use v6.0.0
#安装github
yum install git -y
#下载nvm
git clone git://github.com/creationix/nvm.git ~/nvm
#设置nvm 自动运行;
echo "source ~/nvm/nvm.sh" >> ~/.bashrc
source ~/.bashrc
#查询node版本
nvm list-remote
#安装node.js
nvm install v6.0.0
#使用nodejs
nvm use v6.0.0
转载于:https://www.cnblogs.com/maomingchao/p/10394995.html