nodejs 安装

Installation instructions

*NOTE: If you are using RHEL 6 or CentOS 6, you might want to read about [running Node.js on older distros](https://github.com/nodesource/distributions/blob/master/OLDER_DISTROS.md).*

The Nodesource RPM package signing key is available here: [https://rpm.nodesource.com/pub/el/NODESOURCE-GPG-SIGNING-KEY-EL](https://rpm.nodesource.com/pub/el/NODESOURCE-GPG-SIGNING-KEY-EL)

Run on RHEL, CentOS, CloudLinux, Amazon Linux or Fedora:

**Node.js v15.x**
# As root
curl -fsSL https://rpm.nodesource.com/setup_15.x | bash -

# No root privileges
curl -fsSL https://rpm.nodesource.com/setup_15.x | sudo bash -

Node.js v14.x

# As root
curl -fsSL https://rpm.nodesource.com/setup_14.x | bash -

# No root privileges
curl -fsSL https://rpm.nodesource.com/setup_14.x | sudo bash -

Node.js v12.x

# As root
curl -fsSL https://rpm.nodesource.com/setup_12.x | bash -

# No root privileges
curl -fsSL https://rpm.nodesource.com/setup_12.x | sudo bash -

Node.js v10.x

# As root
curl -fsSL https://rpm.nodesource.com/setup_10.x | bash -

# No root privileges
curl -fsSL https://rpm.nodesource.com/setup_10.x | sudo bash -

Node.js LTS (14.x)

# As root
curl -fsSL https://rpm.nodesource.com/setup_lts.x | bash -

# No root privileges
curl -fsSL https://rpm.nodesource.com/setup_lts.x | sudo bash -

Node.js Current (15.x)

# As root
curl -fsSL https://rpm.nodesource.com/setup_current.x | bash -

# No root privileges
curl -fsSL https://rpm.nodesource.com/setup_current.x | sudo bash -

Optional: install build tools

To compile and install native addons from npm you may also need to install build tools:

yum install gcc-c++ make
# or: yum groupinstall 'Development Tools'
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • root权限下运行该命令: curl --silent --location https://rpm.nodeso...
    wqching阅读 3,821评论 0 0
  • 1. 下载安装 https://nodejs.org/en/download/ (使用MSI文件安装,如果安装过程...
    清霆阅读 1,544评论 0 0
  • Ubuntu上nodejs 安装 文档地址:https://nodejs.org/en/download/pack...
    hojun阅读 3,483评论 0 0
  • 在centos7安装nodejs,刚开始用的是网上很多人推荐的下载tar包解压配置环境变量的做法,但是发现在使用n...
    大雄喵阅读 13,950评论 1 1
  • 简单的说Node.js 就是运行在服务端的 JavaScript。 Node.js 是一个基于Chrome Jav...
    刘佳季阅读 2,649评论 0 0

友情链接更多精彩内容