一、概要
1. 环境
(1) Rocky Linux 9.1
(2) Node.js 16.0
二、安装
1. 准备
(1) 更新仓库
sudo dnf update -y
(2) 安装NPM依赖的构建工具
sudo yum groupinstall 'Development Tools' -y
2. Node.js 18.x
(1) 安装
curl -fsSL https://rpm.nodesource.com/setup_18.x | sudo bash - sudo yum install -y nodejs
(2) 校验
node -v npm -v
3. Node.js 16.x
(1) 安装
curl -fsSL https://rpm.nodesource.com/setup_16.x | sudo bash - sudo yum install -y nodejs
(2) 校验
node -v npm -v
三、参考
https://technixleo.com/install-node-js-centos-almalinux-rhel/
标签:Node,Rocky,安装,sudo,js,https,com From: https://www.cnblogs.com/eagle6688/p/17195441.html