CentOS 7 安装Nodejs 16 LTS版

编程教程 > WEB > JavaScript (2920) 2024-11-26 14:39:04

 

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

 


评论
User Image
提示:请评论与当前内容相关的回复,广告、推广或无关内容将被删除。

相关文章
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....
Ubuntu/linux通过nvm工具安装指定版本/多个版本切换nodejs由于某些原因需要安装低版本的nodejs,官方源直接安装基本都是某个大版本下的最新小版本,然不满足需求。
CentOS 7 安装最新Docker-ce# 配置repo源 默认repo源没有docker-ce安装包,需要新的repo源安装依赖库,yum-utils 提供命令"yum-config-ma...
nodejs中http模块使用简单demo
linux系统之centos 7 安装和配置redis,redis是一个高性能的key-value数据库,通常用于分布式缓存
说明在Linux系统中安装和配置Java的运行或者编译jdk环境。安装分两种类型,系统安装包例如centos系列的有rpm包或者通过yum安装;第二总就是Lin
先安装nodejs然后全局安装pnpm工具npm install -g pnpm
centos 7 安装配置samba服务,centos 7,samba4.x
centos6 yum安装redis3.29,centos6 源码安装redis以及常用配置
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
centos7升级内核,centos 7