To install a specific nodejs version, Visit our tutorial Install Specific Node.Js Version with NVM.

Step 1 – Configure Yum Repository

First of all, You need to enable node.js yum repository in your system provided by the Node.js official website. You also need development tools to build native add-ons to be installed on your system. For Latest Release:- For Stable Release:- After adding a yum repository to your system let’s install the Node.js package. NPM will also be installed with node.js. This command will also install many other dependent packages on your system.

Don’t Miss => Yarn Installation ( A Node Modules Manager)

Step 3 – Check Version

After installation checks the installed version of Node.js. You can find more details about the current version on node.js official website. Also, check the version of npm.

Step 4 – Create Demo Web Server (Optional)

This is an optional step. If you want to test your node.js install. Let’s create a web server with the “Welcome Node.js” text. Create a file demo_server.js and add the following content Now start the web server using the command. Therefore the web server has been started on port 3000. Now access http://127.0.0.1:3000/ URL in the browser.

How To Install Latest Nodejs on Amazon Linux   TecAdmin - 5