Install Node.js on CentOS Server
You can find latest version of Node.js at
To install Node.js on CentOS 7/8
Add node.js repository
NodeJS 12.x
1 |
curl -sL https://rpm.nodesource.com/setup_12.x | bash - |
NodeJS 11.x
1 |
curl -sL https://rpm.nodesource.com/setup_11.x | bash - |
NodeJS 10.x
1 |
curl -sL https://rpm.nodesource.com/setup_10.x | bash - |
NodeJS 8.x
1 |
curl -sL https://rpm.nodesource.com/setup_8.x | bash - |
NodeJS 6.x
1 |
curl -sL https://rpm.nodesource.com/setup_6.x | bash - |
Install node.js with
1 |
yum -y install nodejs |
For npm to install native modules, install dev tools
1 |
yum install gcc-c++ make |
Or
1 |
yum groupinstall 'Development Tools' |
See Node.Js