CentOS 7 通过 yum 安装 nodejs 和 npm

 时间:2026-04-21 15:07:07

1、获取nodejs 资源

# 4.x

curl --silent --location https://rpm.nodesource.com/setup_4.x | bash -

# 5.x

curl --silent --location https://rpm.nodesource.com/setup_5.x | bash -

# 0.10

curl --silent --location https://rpm.nodesource.com/setup | bash -

我这里安装的是 v4.x

CentOS 7 通过 yum 安装 nodejs 和 npm

CentOS 7 通过 yum 安装 nodejs 和 npm

2、安装

yum install -y nodejs

CentOS 7 通过 yum 安装 nodejs 和 npm

CentOS 7 通过 yum 安装 nodejs 和 npm

3、测试是否安装成功

node -v 

 # v4.4.0

npm -v

# 2.14.20

CentOS 7 通过 yum 安装 nodejs 和 npm

  • 怎么在win7下面简单搭建web服务器
  • linux中如何使用rpm安装apache服务?
  • 如何在Notepad++中配置C++环境?
  • 虚拟机redhat 6安装oracle11g各种问题总结
  • jquery如何通过属性值查找元素
  • 热门搜索
    纲举目张是什么意思 kenzo是什么牌子中文 root权限是什么意思 嘴角开裂是什么原因 初乳是什么颜色 我国的国体是什么 什么像什么造句 ptsd是什么意思 dos是什么意思 宇宙之外是什么