CentOS7利用yum安装node.js

1.下载node.js各版本

V8.x: 

#curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -

V7.x:

#curl --silent --location https://rpm.nodesource.com/setup_7.x | bash -

V6.x:

#curl --silent --location https://rpm.nodesource.com/setup_6.x | bash -

V5.x:

#curl --silent --location https://rpm.nodesource.com/setup_5.x | bash -

2.yum安装node.js

yum install -y nodejs

3.查看node.js版本

node -v
原文地址:https://www.cnblogs.com/yanwanglol/p/8762488.html