CentOS 7 安装Nodejs 16 LTS版

编程教程 > WEB > JavaScript (2909) 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....
nodejs中http模块使用简单demo
java编程中使用nodejs的apidoc工具生成Java api美观的HTML文档,apidoc可以根据代码注释生成web api文档,支持大部分主流语言
artDialog v7 使用说明及API文档,artDialog ,artDialog具有bootstrap风格的弹窗组件
常用正则表达式正则表达式用于字符串处理、表单验证等场合,实用高效。现将一些常用的表达式收集于此,以备不时之需。用户名:/^[a-z0-9_-]{3,16}$/密
主流模块规范目前主流模块规范有:规范名称运行环境实现加载方式AMD(异步模块定义)客户端require.js异步CMD(通用模块定义)客户端sea.js异步Co
普通写法​vantUI 使用字体图标和文字<template&gtl; <van-tabbar v-model="active" active-color="#07c160"&gtl...
artdialog 弹出页面iframe,artDialog,artDialog弹出页面
Log4j 2 简介       Apache Log4j 2是对Log4j 1.x的升级,相对于其先前版本进行了重大改进,例如性能改进,自动重新加载已修改的配置文件,java 8 lambda...
MySQL,从大概5.7版本开始支持json数据类型,但是5.7的json查询不支持创建索引,在MySQL 8.0.17 后支持了索引,但是创建和查询使用索引与常规索引不同
环境说明1.MySQL5.7(注意,json格式最低需要改版本支持);2.存json数据的数据库字段类型必须是json,不能是varchar;
​JavaScript 数学小数精确计算<!DOCTYPE html&gtl; <html&gtl; <head&gtl; <title&gtl;</tit...
json-path 组件使用java 版 jsonpath引入依赖        <dependency&gtl;            <groupId&gtl;com.jay...
类库方式实现:<!DOCTYPE html&gtl; <html lang="en"&gtl; <head&gtl; <meta charset="UTF-8"...