一、下载Node

官网下载链接:https://nodejs.org/zh-cn/download/

Linux上安装node和npm

解压目录

# yum install -y xz
# xz -d node-v8.11.1-linux-x64.tar.xz
# tar -xf node-v8.11.1-linux-x64.tar

这里想要全局使用npm 和 node,就需要做相关软链,如下!

# cd /usr/local/bin
# ln -s /usr/local/src/node-v8.10.0-linux-x64/bin/npm
# ln -s /usr/local/src/node-v8.10.0-linux-x64/bin/node

然后即可在任意位置执行 node -v npm -v 查看相应的版本,则安装完成!

二、使用淘宝镜像

# npm config get registry // https://registry.npmjs.org/
# npm config set registry https://registry.npm.taobao.org

相关文章:

  • 2021-10-05
  • 2021-04-16
  • 2021-09-23
  • 2021-12-02
  • 2021-12-15
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-03-03
  • 2021-11-30
  • 2022-01-03
  • 2022-02-19
  • 2021-10-11
  • 2021-08-14
  • 2022-12-23
相关资源
相似解决方案