Installing Node.js on CentOS 8/7 and RHEL 8/7 Linux servers or desktop workstations will be covered in this guide. With the V8 JavaScript engine at its core, Node.js is a server-side scripting language developed as part of the Google Project. Using Node.js’ event-driven and non-blocking I/O mechanism, developers can create fast and nimble apps. There are several npm modules that may be used to enhance the capabilities of Node.js.
Step:1
To add the repository for the latest version of Node.js 14.x, use the following command as root.
curl -sL https://rpm.nodesource.com/setup_14.x | bash -
To install Node.js 12. x, use the following command as root.
curl -sL https://rpm.nodesource.com/setup_12.x | bash -
To install Node.js 10.x, use the following command as root.
curl -sL https://rpm.nodesource.com/setup_10.x | bash -
Now installing nodejs14 in the system.


Step: 2
Next, you can now install Nodejs and NPM on your system using the command below:
yum -y install nodejs


Step3: optional:
optional: There are development tools such as GCC-c++ and make that you need to have on your system in order to build native addons from npm
Use below command:
yum install gcc-c++ make -y

NPM and Nodejs has installed.
To check the version of npm and nodejs, use the below command :
node -v npm -v
