Install Latest Node.js on CentOS / RHEL 7
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
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-
curl -sL https://rpm.nodesource.com/setup_12.x | sudo -E bash -
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:
That’s all.Thanks for reading. ?
npm-v # output 6.9.0
Preview may take a few seconds to load.
Below you will find some common used markdown syntax. For a deeper dive in Markdown check out this Cheat Sheet
Bold & Italic
Bold **double asterisks**
Three back ticks and then enter your code blocks here.
# This is a Heading 1
## This is a Heading 2
### This is a Heading 3
> type a greater than sign and start typing your quote.
You can add links by adding text inside of  and the link inside of (), like so:
To add a numbered list you can simply start with a number and a ., like so:
1. The first item in my list
For an unordered list, you can add a dash -, like so:
- The start of my list
You can add images by selecting the image icon, which will upload and add an image to the editor, or you can manually add the image by adding an exclamation !, followed by the alt text inside of , and the image URL inside of (), like so:
To add a divider you can add three dashes or three asterisks:
--- or ***