centOS --- 安装最新版的node nodejs

Posted ⬆️小马哥⬆️

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centOS --- 安装最新版的node nodejs相关的知识,希望对你有一定的参考价值。

对于 RHEL, CentOS or Fedora 系统,Node.js v8 LTS版本命令:

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

而 Node.js 10 的命令:

curl –silent –location https://rpm.nodesource.com/setup_10.x | sudo bash -

然后安装:

sudo yum -y install nodejs

替换npm为淘宝源码
npm install -g cnpm - -registry=https://registry.npm.taobao.org

以上是关于centOS --- 安装最新版的node nodejs的主要内容,如果未能解决你的问题,请参考以下文章