Menu
User

DropVPS Team

Writer: Cooper Reagan

How to Install Node.js on Red Hat 8/9

How to Install Node.js on Red Hat 8/9

Publication Date

09/22/2025

Category

Articles

Reading Time

2 Min

Table of Contents

Node.js is a widely used runtime for running JavaScript outside the browser. It powers modern web applications, APIs, and scalable backend services. On Red Hat Enterprise Linux (RHEL), installing Node.js is simple with the right repository configuration.

Step 1: Update System Packages

Before installing, refresh your system to ensure you’re working with the latest package information:

sudo dnf update -y

Step 2: Enable Node.js Module

Red Hat provides Node.js modules in its official repositories. First, list available versions:

sudo dnf module list nodejs

Enable your preferred version (for example, Node.js 20):

sudo dnf module enable nodejs:20 -y

Step 3: Install Node.js

Once the module is enabled, install Node.js and npm:

sudo dnf install nodejs -y

Step 4: Verify Installation

Check the installed versions to confirm everything is working:

node -v
npm -v

If version numbers display, Node.js is installed successfully.

Step 5: Install Build Tools (Optional)

Some npm packages require compiling native add-ons. To avoid build errors, install the necessary development tools:

sudo dnf groupinstall "Development Tools" -y

Node.js and npm are now installed and configured on Red Hat. Your system is ready to run scalable JavaScript applications, APIs, and backend services efficiently.

Linux VPS
U
Loading...

Related Posts

How to Install Node.js on Red Hat 8/9