How to install node.js on AWS AMI Linux instance

How to install node.js on AWS AMI Linux instance

It’s even simpler than more tutorials are saying. After login to instance, just enable EPEL repository

sudo nano /etc/yum.repos.d/epel.repo

change enabled to 1

[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1

update your repo (could take a minute)

sudo yum update

and install npm (will also add nodejs)

sudo yum install npm

let’s check if it’s working:

node -v v0.10.12