Centos7 安装Node.js的方法步骤

5,009 阅读1分钟

删除旧的 nodejs 版本:

yum remove nodejs

第1步 - 添加Node.js Yum存储库

最新发布: -

$ yum clean all && yum makecache fast
$ yum install -y gcc-c++ make
$ curl -sL https://rpm.nodesource.com/setup_12.x | sudo -E bash -

稳定发布: -

$ yum clean all && yum makecache fast
$ yum install -y gcc-c++ make
$ curl -sL https://rpm.nodesource.com/setup_10.x | sudo -E bash -

第2步 - 在CentOS上安装Node.js.

  yum install nodejs

检查Node.js和NPM版本

node -v

npm -v