Install Latest Node.js on CentOS / RHEL 7

Published on October 15, 2019 35 sec read

In this guide, I’m going to show how to install the latest Node.js on CentOS or RHEL 7. Let’s follow these steps:

Table of Contents

  1. Add Node.js Repository
  2. Install Node.js
  3. Check Node.js and NPM Version

Step 1 : Add Node.js Repository

At first, we need to add the Node.js repository in the machine. Let’s add Node.js repo from their official website.

Before adding repository install gcc-c++ make using this command:

yum install -y gcc-c++ make-

Latest Release:

curl -sL | sudo -E bash -

Stable Release:

curl -sL | sudo -E bash -

Step 2 : Install Node.js

We have added the Node.js repository. Now we can install Node.js including NPM using this command:

sudo yum install nodejs

Step 3 : Check Node.js and NPM Version

After successful installation, let’s check the Node.js version using this command:

node -v
# output

Check NPM version:

# output
That’s all.Thanks for reading. 🙂

Monthly Newsletter

One email a month, packed with the latest tutorials, delivered straight to your inbox.
We'll never send any spam or promotional emails.

Hey, I'm Md Obydullah. I build open-source projects and write article on Laravel, Linux server, modern JavaScript and more on web development.