CentOS 7 安装Nodejs 16 LTS版

教程分享 > WEB技术 > JavaScript > 博文分享 (3688) 2024-08-07 11:21:12

 

CentOS 7 安装Nodejs 16 LTS版
CentOS 7 安装Nodejs 16 LTS版

配置源

以下操作基于root用户

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

安装nodejs16 LTS长期维护版

sudo yum install -y nodejs
安装完成

 


安装完成后通过命令验证版本


其他长期版本安装参考:
 

 

Node.js v18.x

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

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

Node.js v16.x

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

# No root privileges
curl -fsSL https://rpm.nodesource.com/setup_16.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 LTS (16.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 (18.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 -

Nodejs 卸载

# use `sudo` or run this as root
yum remove nodejs
rm -r /etc/yum.repos.d/nodesource*.repo
yum clean all


更多参考:distributions/README.md at master · nodesource/distributions · GitHub

 


相关文章
CentOS 7 安装Nodejs 16 LTS版配置源以下操作基于root用户curl -fsSL https://rpm.nodesource.com/setup_lts.x | bash ...
1.打开github nodejs源码地址GitHub - nodesource/distributions: NodeSource Node.js Binary Distributions2....
由于某些原因需要安装低版本的nodejs,官方源直接安装基本都是某个大版本下的最新小版本,然不满足需求。 首先是安装nvm脚本工具访问github下载脚本工具库
CentOS 7 安装最新Docker-ce# 配置repo源 默认repo源没有docker-ce安装包,需要新的repo源安装依赖库,yum-utils 提供命令"yum-config-ma...
nodejs中http模块使用简单demo
linux系统之centos 7 安装和配置redis,redis是一个高性能的key-value数据库,通常用于分布式缓存
centos6 yum安装redis3.29,centos6 源码安装redis以及常用配置
centos 7 安装配置samba服务,centos 7,samba4.x
centos7 redis安装配置以及集群
Docker Nodejs 18.20.4 环境编译vue项目 sudo docker run --rm --name node18c -v /your/pro
java编程中使用nodejs的apidoc工具生成Java api美观的HTML文档,apidoc可以根据代码注释生成web api文档,支持大部分主流语言
centos7安装docker启动报错 Error starting daemon: layer does not exist
安装系统时候为了快速安装采取centos 6.9minimal版本,偶尔需要使用窗口桌面这里讲解如何安装
在Linux系统中安装和配置Java的运行或者编译jdk环境。安装分两种类型,系统安装包例如centos系列的有rpm包或者通过yum安装;第二总就是Linux通用的方法,下载对应系统的jdk压...
centos7升级内核,centos 7