How to install Node.js and NPM on Centos?

Before installation, please check your server operation system, this time we will install node.js on centos 6.7:

Then you can check which yum repository you should use, please read Node.js Binary Distributions to find the yum repository Step 1. Add node.js yum repository

In my case, I chosed NodeJS 8.x on CentOS 6 Step 2: Install node.js and NPM