Monday, July 23, 2012

Install Node.JS & g++ (if necessary) on EC2


echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/latest/node-v0.6.11.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local

(if you cannot configure previous step, you will need to install g++ and go back to configure again)
sudo yum groupinstall "Development Tools"

sudo make install
curl http://npmjs.org/install.sh | sudo npm_debug=1 clean=no PATH=$PATH sh

There you go, you should be able to run node.js now.

npm install socket.io

No comments:

Post a Comment