Skip to content

庄朋龙的博客

有志者自有千方万计,无志者只感千难万难。

Menu
  • 首页
  • 生活
  • 创业
  • 编程
  • 运维
  • 视频课程
    • 跨境独立站
    • Shopee跨境电商
    • TEMU跨境电商
  • 资源分享
    • 网站推荐
    • 开源推荐
    • 可商用字体
    • 书籍分享
Menu

Centos7 安装 node 以及升级更新到最新版本

Posted on 2020年10月13日 by 庄朋龙

一番搜索,得出结果:先安装 node,然后给通过 npm 安装工具 n 来管理 node 版本,升级到最新稳定版即可

sudo yum install -y nodejs
sudo npm install n -g
sudo n stable  # 安装最新版本
PATH="$PATH"
installing : node-v12.14.0
       mkdir : /usr/local/n/versions/node/12.14.0
       fetch : https://nodejs.org/dist/v12.14.0/node-v12.14.0-linux-x64.tar.gz
   installed : v12.14.0 (with npm 6.13.4)

Note: the node command changed location and the old location may be remembered in your current shell.
         old : /usr/bin/node
         new : /usr/local/bin/node
To reset the command location hash either start a new shell, or execute PATH="$PATH"

注意Note 和 最后一句话: 因为安装完成之后我们需要用新版本替换旧版本,而且告诉了我们新旧版本的位置,最重要的一点是在命令行运行PATH="$PATH" 或者重启你的 shell 即可。

Category: 资源分享

1 thought on “Centos7 安装 node 以及升级更新到最新版本”

  1. sikis izle说道:
    2020年11月15日 上午1:02

    I was reading some of your articles on this site and I conceive this internet site is rattling instructive! Keep posting . Marigold Aron Spector

Comments are closed.

全栈开发者×创业偏执狂

相信代码能改变命运,也相信凌晨四点的服务器警报里有真实的人生。

我的创业项目:
SHOPAGG / SmallShop / DigitShops / 文硕阁

© 2025 庄朋龙的博客