Node.js is not available in the default CentOS / Red Hat package repository but in EPEL (Extra Packages for Enterprise Linux) repository. Even so, it's still a slightly outdated version of Node.js.
If you require the latest or specific version of Node.js for CentOS and Red Hat (RHEL), you can install from NodeSource's yum repostirory.
Related: How to install latest version of Node.js for CentOS / Red Hat / Fedora
Steps to install Node.js on CentOS, Red Hat or Fedora:
- Enable epel-release repository by installing the epel-release package.
$ sudo yum install --assumeyes epel-release
- Install nodejs package. This will also install npm as dependency.
$ sudo yum install --assumeyes nodejs ########################## ============================================================================================== Package Arch Version Repository Size ============================================================================================== Installing: nodejs x86_64 1:6.14.3-1.el7 epel 4.7 M Installing for dependencies: http-parser x86_64 2.7.1-5.el7_4 base 28 k libuv x86_64 1:1.22.0-1.el7 epel 127 k npm x86_64 1:3.10.10-1.6.14.3.1.el7 epel 2.5 M Transaction Summary ============================================================================================== Install 1 Package (+3 Dependent packages) ##########################
- Check installed node and npm version.
$ node -v v6.14.3 $ npm -v 3.10.10
![](https://www.simplified.guide/_media/page/author/shakir/mohd-shakir-zakaria.jpg?w=200&tok=d15487)
Author: Mohd
Shakir Zakaria
Mohd Shakir Zakaria is an experienced cloud architect with a strong development and open-source advocacy background. He boasts multiple certifications in AWS, Red Hat, VMware, ITIL, and Linux, underscoring his expertise in cloud architecture and system administration.
![](data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABOElEQVRIia2VYXHDMAyFPwiBEAiBYAYLg5lBC8EQyqBmsDFoGKQMFgYNg+1H5jtFtmMn6bvzj9jWe7IUSVBGD9yBh1p34KPCPosr8AJ+C+sFXPYQd8BYQazX+G9bJK/xeus1WRFJ7oAGsMAkCCbgKb5ncbcXIm1KQBoasd9kvGoTRDJcK1jWT+1THhTQKg4rD+c3CUien3BgFPlwgDzAKS4DcGPjaTvRKa4bLB5HqicQReOdAk2NwPWEgKkReJwQ0PkcALzaPBqmhrjNeIiLLJT7HpFcg7RBWcbfsQ7XhXyr+GSZC7nm14TLXnjeERdMKvH6n9fLa29CmYckO5YkfUtPFKYM+Uyio1pxoXZCDRkBmzPw4tIIfLH926YEfMkrlzCqFaguUsN6AJUEnhxsMT1LknNwFGbHH5UF4DVNwliLAAAAAElFTkSuQmCC)
Mohd Shakir Zakaria is an experienced cloud architect with a strong development and open-source advocacy background. He boasts multiple certifications in AWS, Red Hat, VMware, ITIL, and Linux, underscoring his expertise in cloud architecture and system administration.
Discuss the article:
Comment anonymously. Login not required.