Install Nodejs on Centos 7

Node.js is a Javascript platform for server-side programming. It allows users to easily create networked applications that require backend functionality. By using Javascript as both the client and server language, development can be fast and consistent.

First I’ve tried to install Node using yum package installer ( epel repository ), but it didn’t install latest Node and npm versions. To after some investigation I decided to install Node using nvm package installer.

Installation is quite simple and  straight forward and didn’t raise any new issues – to my surprise.


NVM package repository is at

To begin installation ( or update nvm ) use install script 

wget -qO- | bash

Script will clone nvm repository to ~/.nvm and add source lines to your profile. Details on installation specifics you can find on repository home page.

Important: After installation close the terminal, and reopen new session.

Note: On Linux, after running the install script, if you get nvm: command not found or see no feedback from your terminal after you type: 

command -v nvm

Install Node and npm

To install latest node release just enter :

nvm install --latest-npm

After installation check node and npm versions

[[email protected] ~]$ node -v
[[email protected] ~]$ npm -v

NVM installation gives option to use several Node versions, but for this you need to specify which node version your project will use.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.