How to install NodeJs on Linux Centos 7x

How to install NodeJs on Linux Centos 7x

December 10, 2019

Prerequisites

Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges.

To gain access to the EPEL repo, you must modify the repo-list of your installation. Fortunately, we can reconfigure access to this repository by installing a package available in our current repos called epel-release.

The current LTS version of Node.js is version 10.x. If you want to install version 8 just change setup_10.x with setup_8.x in the command below.

Run the following curl command to add the NodeSource yum repository to your system:

sudo yum install epel-release
curl -sL https://rpm.nodesource.com/setup_10.x | sudo bash -

Now that you have access to the EPEL repository, you can install Node.js using your regular yum commands:

sudo yum install nodejs

Once again, you can check that the installation was successful by asking Node to return its version number:

node --version
v10.13.0
npm --version
6.4.1

Thank you.

Prerequisites

Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges.

To gain access to the EPEL repo, you must modify the repo-list of your installation. Fortunately, we can reconfigure access to this repository by installing a package available in our current repos called epel-release.

The current LTS version of Node.js is version 10.x. If you want to install version 8 just change setup_10.x with setup_8.x in the command below.

Run the following curl command to add the NodeSource yum repository to your system:

sudo yum install epel-release
curl -sL https://rpm.nodesource.com/setup_10.x | sudo bash -

Now that you have access to the EPEL repository, you can install Node.js using your regular yum commands:

sudo yum install nodejs

Once again, you can check that the installation was successful by asking Node to return its version number:

node --version
v10.13.0
npm --version
6.4.1

Thank you.

Leave A Comment

ZiniSoft

Hello! We are a group of skilled developers and programmers.

Hello! We are a group of skilled developers and programmers.

We have experience in working with different platforms, systems, and devices to create products that are compatible and accessible.