Skip to content

NodeJS Installation

Following are the instruction to install and configure NodeJS

  • Installation of NodeJS on various environments.
  • Installation is done on Centos, Ubuntu machines.
  • NodeJS version 6.x, 7.x and 8.x

-== NodeJS Installation on Centos 7.x ==-

Step-1: Install dependencies

sudo yum install gcc-c++ make

Step-2: Add NodeJS Repository

# 6.x
sudo curl -SL https://rpm.nodesource.com/setup_6.x | bash -

# 7.x
sudo curl -sL https://rpm.nodesource.com/setup_7.x | bash -

# 8.x
sudo curl -sL https://rpm.nodesource.com/setup_8.x | bash -

Step-3: Install NodeJS

sudo yum -y install nodejs npm

Step-4: Check the Installation version

$ node -v
$ npm -v

-== NodeJS Installation on Ubuntu 16.04 LTS ==-

Step-1: Install the dev dependencies

sudo apt-get install python-software-properties build-essential

Step-2: Add NodeJS Repository

# Add NodeJS 6.x Repository
sudo curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -

# Add NodeJS 7.x Repository
sudo curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -

# Add NodeJS 8.x Repository
sudo curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -

Step-3: Install Node and NPM

sudo apt-get install nodejs

Step-4: Check the Installation version

$ node -v
$ npm -v

Shashi View All

A passionate devops and automation engineer

2 thoughts on “NodeJS Installation Leave a comment

Leave a comment