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如何通过属性值查找元素
  • 热门搜索
    总胆固醇偏高是什么意思 不解藏踪迹的解是什么意思 mwh是什么单位 梦见开车是什么意思 彩蛋是什么意思 lae是什么意思 自愧弗如的弗是什么意思 脚后跟疼是什么原因 joe是什么意思 皂基是什么