Introduction
Node.js is a cross-platform, open-source server environment that can run on Windows, Linux, Unix, macOS, and more. Node.js is a back-end JavaScript runtime environment, that runs on the V8 JavaScript Engine, and executes JavaScript code outside a web browser.
Node.js is widely used for the back-end of applications, like using Express.js to build the back-end of classic web applications. Also, it is used for server-side programming and non-blocking, event-driven servers like typical websites and backend API services.
In this article, we will explain to you how to install node.js on CentOS 7.
Install the node.js
- Update the package index.
# sudo yum -y update
- Update the system to include node source information.
# sudo curl –sL https://rpm.nodesource.com/setup_14.x | sudo bash -
-
Install Node.js.
# sudo yum install -y nodejs
- Verify the node.js version by running the following command.
# node -v
Output
v14.21.2