curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -
curl --silent --location https://rpm.nodesource.com/setup_7.x | bash -
curl --silent --location https://rpm.nodesource.com/setup_6.x | bash -
curl --silent --location https://rpm.nodesource.com/setup_5.x | bash -
yum install -y nodejs
node -v
npm install -g n
n <version>
n latest
n stable
n rm <version>
n list
原文:https://www.cnblogs.com/peteremperor/p/9425197.html