HugeServer Knowledgebase

How to install Node.js 7 and NPM 4 on CentOS 6/7, Debian 8 and Ubuntu 16

What is Node.js?

Node.js is an open source, cross-platform runtime environment for developing server-side and networking applications. Node.js applications are written in JavaScript, and can be run within the Node.js runtime on OS X, Microsoft Windows, and Linux. Node.js also provides a rich library of various JavaScript modules which simplifies the development of web applications using Node.js to a great extent.

What is NPM?

NPM, short for Node Package Manager, is two things: first and foremost, it is an online repository for the publishing of open-source Node.js projects. second, it is a command-line utility for interacting with said repository that aids in package installation, version management, and dependency management. A plethora of Node.js libraries and applications are published on NPM, and much more are added every day.

NodeJS and NPM Logo

We are assuming that you have root permission, otherwise, you may start commands with “sudo”.

Install Node.js and NPM

If you want to install Node.js 7 and NPM 4 you have to install them via RPM/DEB packages.

On Debian 8 and Ubuntu 16

apt-get install python-software-properties

curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -

Now you can install Node.js and NPM easily by typing:

apt-get install nodejs

You can check the version of your Node.js and NPM with:

node -v

v7.7.1

npm -v

4.1.2

On CentOS 6 and CentOS 7

Run the commands below to install NPM and NodeJS on your CentOS Server.

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

yum install nodejs

It’s done, check the version of Node.js and NPM:

node -v

v7.7.1

npm -v

4.1.2

You can find out more about Node.JS releases and documentation on its official website!

Was this tutorial helpful?

Thank you for your vote.Thank you for your vote.

Similar Posts

One thought on “How to install Node.js 7 and NPM 4 on CentOS 6/7, Debian 8 and Ubuntu 16”

Leave a Reply

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

*