Installing Node.js

The first thing we need to do is install Node.js. Amazon Linux is based on Red Hat Enterprise Linux (RHEL) and uses the yum utility to manage and install packages. The OS comes with Extra Packages for Enterprise Linux (EPEL) preconfigured in it. As we would expect, Node.js is present in EPEL:

[ec2-user@ip-172-31-22-52 ~]$ sudo yum install --enablerepo=epel -y nodejs [ec2-user@ip-172-31-22-52 ~]$ node -vv0.10.48

This is definitely an old version of the node but it's going to be good enough for what we need.

Get Effective DevOps with AWS - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.