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:
1 2 |
# cat /etc/centos-release CentOS release 6.7 (Final) |
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
1 |
curl -sL https://rpm.nodesource.com/setup_8.x | sudo -E bash - |
In my case, I chosed NodeJS 8.x on CentOS 6 Step 2: Install node.js and NPM
1 |
yum install nodejs |