Wednesday, April 22, 2015

AWS EC2: Install Node.js on an Amazon Linux AMI instance

I wanted to install Node.js on my Amazon Linux EC2 instance. Unlike Ubuntu, I can't just apt-get install nodejs.

The solution appears to be very simple. I just need to enable the EPEL (Extra Packages for Enterprise Linux) repository to get yum install to work.

1. Edit the repository config file
  sudo nano /etc/yum.repos.d/epel.repo

2. In the [epel] section, change the enabled flag to 1

3. Press Ctrl+O to save the file, and then Ctrl+X to exit

4. Update yum
  sudo yum update

5. Install npm and Node.js
  sudo yum install npm

6. Verify Node.js is installed
  node -v

How to install node.js on AWS AMI Linux instance | SpiderSoft

No comments: