Here is what worked form me when I tried to installed node.js on a fresh EC2 Amazon linux instance.
wget http://nodejs.org/dist/node-v0.4.12.tar.gz tar -zxvf node-v0.4.12.tar.gz cd node-v0.4.12 yum groupinstall "Development Tools" yum install make sudo make install
The main issue that I had to figure out was that Development Tools and make was not installed, so this took me little bit to figure out, being a Linux novice ;)
This article is a good starting point, however it's missing the above details, if you just pick the default instance. Of course, you can browser through the community instances, and probably find something that has all the node.js stuff already installed.
Now going through the NPM installation, again a few hoops to jump, but figured it out:
sudo chown -R $USER /usr/local sudo curl http://npmjs.org/install.sh | sh
Now I am ready to roll! ... wait, not quite, npm installed but is not actually working...
After reading around little bit, the fact that I build node without ssl support is not biting me back... so have to go back and reinstall...
sudo yum -y install openssl-devel
and now rebuild node again...
cd node-v0.4.12 sudo make install
ok now let's try it...
npm install lightnode
yea... it works... ready to roll now. In the meantime, I found this article, which seems to be more accurate, so in case my steps don't work, you can get some ideas here.