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

posted @ 2019-04-22 11:22  ma_fighting  阅读(2091)  评论(0编辑  收藏  举报
历史天气查