前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Installing Node.js and npm on CentOS 7

Installing Node.js and npm on CentOS 7

作者头像
用户1065635
发布2019-03-21 11:03:22
9290
发布2019-03-21 11:03:22
举报
文章被收录于专栏:前端社区前端社区

NodeSource is a company dedicated in providing enterprise-grade Node support and they maintain a consistently-updated Node.js repositories for Linux distributions.

To install Node.js and npm from the NodeSource repositories on your CentOS 7 system, follow these steps:

  1. Add NodeSource yum repository

The current LTS version of Node.js is version 10.x. If you want to install version 8 just change setup_10.x with setup_8.x in the command bellow.

Run the following curl command to add the NodeSource yum repository to your system:

代码语言:javascript
复制
curl -sL https://rpm.nodesource.com/setup_10.x | sudo bash -
  1. Install Node.js and npm

Once the NodeSource repository is enabled install Node.js and npm by typing:

代码语言:javascript
复制
sudo yum install nodejs

When prompted to import the repository GPG key, type y and press Enter.

  1. Verify the Node.js and npm Installation

To check that the installation was successful, run the following commands which will print the Node.js and npm versions.

Print Node.js version:

代码语言:javascript
复制
node --version

v10.13.0

Print npm version:

代码语言:javascript
复制
npm --version
代码语言:javascript
复制
6.4.1
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档