Open In App

How To YUM Install Node.JS On Amazon Linux ?

Last Updated : 13 Feb, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

yum stands for Yellowdog Updater Modified is a package manager utility for Red Hat-compatible Linux operating systems. just like ‘apt’ used for Ubuntu distribution yum is used to install, update, and remove software packages. yum simplifies the process of installing software packages and ensures that all necessary packages are installed correctly.

What is Node JS?

Node JS is a javascript-based open-source runtime environment that allows developers to run code on the front end as well as on backend development. The main advantage of node js is that developers can use javascript as their language for client-side & server-side which ultimately simplifies the development of an application. Node JS is extensively used in building real-time applications like chat applications, APIs, and many more.

Step-By-Step Guide to yum install Node.JS on Amazon Linux

Step 1: Log in to your AWS Management Console. To know how to create an Amazon free tier account refer to Amazon Web Services (AWS) – Free Tier Account Set up.

Step 2: Launch one Amazon Linux Instance.

Step 3: After Launching your EC2 instance wait for it to pass 2/2 status checks and then connect to your ec2 instance

Note: We have used putty to connect to our instance you can use other alternatives as well like MobaXterm, KiTTY, Solar-PuTTY, etc.

putty

Step 4: Enter your username to login to ec2 instance. Default username for Amazon Linux is ec2-user.

e2-login

Step 5: Gain Root access using sudo -s to avoid any errors
root

Step 6: use yum install nodejs command to install on amazon linux after entering on the terminal it will show that all the necessary information like what are the dependencies yum going to install etc.

nodejs

Step 7: Type Y in Is this ok [y/N] message to continue with the installation after typing yum will install the node js in few seconds.if all goes correct it will show Complete! message like in below image which means that node js is correctly installed on your amazon linux ec2 instance.

install-1

install-2

Step 8: In the last step, we Verify that node js installed all or not by using node command. you can use node -v command as well which gives you installed version of node js

verify-node

Conclusion

In this article, we have gone through step by step explanation of how we can install the node js on amazon linux using yum package manager.

yum install Node.js on Amazon Linux – FAQ’s

Which version of node js can we install on amazon Linux ?

Answer:

The version of node js is may depend on which linux version of amazon you are using .You can check available version using node -v command

How to verify the installation?

Answer:

We can verify the version by using following commands

node -v for Node.js
npm -v for npm (Node Package Manager)


How do I install a specific version of Node.js on Amazon Linux?

Answer:

If you want to install a specific version of Node.js on Amazon Linux, you can specify the version number when installing it with yum.for example

sudo yum install -y nodejs14


How to update to Node.js to the latest version on Amazon Linux?

Answer:

You can update Node.js to the latest version on Amazon Linux using yum by running the following command:

sudo yum update nodejs





Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads