Md Obydullah Follow I'm Md Obydullah. I build open-source projects and write about Laravel, Linux server, modern JavaScript and web development.

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 https://rpm.nodesource.com/setup_12.x | sudo -E bash -

Stable Release:

curl -sL https://rpm.nodesource.com/setup_10.x | 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
v10.16.3

Check NPM version:

npm-v
# output
6.9.0
That’s all.Thanks for reading. 🙂

You're welcome to suggest any article to write!

Md Obydullah Follow I'm Md Obydullah. I build open-source projects and write about Laravel, Linux server, modern JavaScript and web development.

Leave a Reply

Your email address will not be published. Required fields are marked *