What is Node.js?
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 the said repository that aids in package installation, version management, and dependency management. Plenty of Node.js libraries and applications are published on NPM, and much more are added every day.
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 8 and NPM 5 you have to install them via RPM/DEB packages.
On Debian 8 and Ubuntu 16
Execute following commands one by one to install Node.JS 8 on Debian and Ubuntu:
apt-get install curl sudo
curl -sL https://deb.nodesource.com/setup_8.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:
On CentOS 7
Issue the following commands to install Node.JS and NPM on your CentOS:
curl -sL https://rpm.nodesource.com/setup_8.x | bash -
yum install nodejs
It’s done, check the version of Node.js and NPM:
For more information and news you can check out Node.JS official website!