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 | 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 | sudo npm_debug=1 clean=no PATH=$PATH sh

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

npm install

No comments:

Post a Comment