Installing Node on AWS Linux AMI

Here are the steps to install node, npm and express on Amazon 32 bit Linux AMI:

  1. sudo yum install gcc-c++ make
  2. sudo yum install openssl-devel
  3. wget http://nodejs.org/dist/node-v0.4.7.tar.gz (Pick the latest stable version available)
  4. tar -zxvf node-v0.4.7.tar.gz
  5. cd node-v0.4.7
  6. export JOBS=2
  7. ./configure
  8. make
  9. sudo make install
  10. sudo su
  11. vi /etc/sudoers (We add node to the path of the sudo)
  12. Find and edit the line “Defaults secure_path …” and add “:/usr/local/bin” to the end of the path
  13. curl http://npmjs.org/install.sh | sudo sh

References:

http://www.embracingthecloud.com/2010/12/05/InstallingNodejsOnAmazonEC2.aspx

https://github.com/joyent/node/wiki/Installation

This entry was posted in nodejs, sips and tagged , , , . Bookmark the permalink.

11 Responses to Installing Node on AWS Linux AMI

  1. Very helpful. Thanks.

  2. I got a strange error message when running “sudo make test”: https://skitch.com/jfmercer/r9tb5/make-test-erro

    Any ideas what’s wrong?

  3. Number 9 says:

    May your gods go with you!!

  4. yigit says:

    if you get an error about line 89 of npm install script (gzip: stdin: unexpected end of file, cd * fails); restart terminal

  5. Pingback: How hard is it to install a node.js server on EC2? - Quora

  6. Finally! A tutorial that worked. Most don’t include adding :/usr/local/bin to the sudoers config.

    Thank you!!

  7. danny says:

    superb. short, to the point, and actually works.

    one thing i would point out though (and this might be obvious to others) is that once i completed step 13 (the last step), i immediately typed:
    $ node
    to see if everything had worked, but it told me that the command wasn’t found. i searched through the terminal looking for errors, but there wasn’t any. after a while, i realised i was still sudo, so exited it (by typing exit) and tried node again, and it worked.

    just my experience.

  8. Dade says:

    Thanks for the tutorial.

    Installing Node works, but i get stuck at installing NPM

    I followed your instruction but i got stuck and the prompt gives the following message:

    “Written by John Gilmore and Jay Fenlason.
    fetching: http://registry.npmjs.org/npm/-/npm-1.0.106.tgz

    Have any idea why?

  9. Pingback: Successful Thinking

  10. Jukka says:

    Another one to the chorus of thank you notes.
    Good post, it was very helpful.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>