• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

Linux环境yum安装nodejs

武飞扬头像
江南极客
帮助1

1.查找nodejs的yum源

https://github.com/nodesource/distributions#rpminstall

学新通
 

2.下载node

curl -sL https://rpm.nodesource.com/setup_17.x | bash -

3.安装node

yum -y install nodejs

4.检查
通过:node -v 和 npm -v  查看版本

学新通


如上图说明安装成功

 
5.替换为淘宝NPM镜像
        5.1首先我们可以查看原本的镜像地址:

npm get registry

        5.2为了后续安装依赖速度更快将镜像替换成淘宝的:

npm config set registry http://registry.npm.taobao.org/

        5.3如果想恢复原来的镜像地址:

npm config set registry https://registry.npmjs.org/

        5.4可以用淘宝定制的cnpm工具来代替默认的npm:

npm install -g cnpm --registry=https://registry.npm.taobao.org

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhfifcic
系列文章
更多 icon
同类精品
更多 icon
继续加载