How To Install Latest Nodejs on CentOS/RHEL 7

Node.js is a platform built on Chrome’s JavaScript runtime for easily building fast, scalable network applications. Latest version node.js yum repository is maintaining by its official website. Use this tutorial to add yum repository and install Latest Nodejs to CentOS/RHEL 7 systems with simple commands.

 

Step 1 – Add Node.js Yum Repository

First of all, You need to enable the node.js yum repository in your system provided by the Node.js official website. You also need development tools to build native add-ons to be installed on your system.

Ads

 

For Latest Release:

yum install -y gcc-c++ make
curl -sL https://rpm.nodesource.com/setup_18.x | sudo -E bash -

For Stable Release:-

Ads

 

yum install -y gcc-c++ make
curl -sL https://rpm.nodesource.com/setup_16.x | sudo -E bash -

Step 2 – Install Node.js on CentOS

After adding a yum repository to your system let’s install the Node.js package. NPM will also be installed with node.js. This command will also install many other dependent packages on your system.

sudo yum install nodejs 

Step 3 – Check Node.js and NPM Version

After installing node.js verify and check the installed version. You can find more details about current version on node.js official website.

node -v   v18.7.0

Also, check the version of npm.

Ads

 

npm -v   7.13.0

You have successfully installed Node.js on your CentOS 7 system. You may try a demo HTTP server as given below.

  • nodejs, nodejs18, setup nodejs on centos
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to upgrade PHP to 7.4 in centos 7?

Enter the following commands on the terminal to upgrade PHP:      1 . To install the latest...

Protocol Buffer Compiler Installation

How to install the protocol buffer compiler. While not mandatory, gRPC applications often...

How to Install Go on CentOS 7

Go, often referred to as golang is a modern open-source programming language created by Google....

Configure gRPC for go and protoc

Quick start This guide gets you started with gRPC in Go with a simple working example....