Installing Node.js from Source

Note: This has been tested on Ubuntu 12.01. It should also work on most CentOS (Redhat) version and Mac's, but I haven't personally tested it.

Copy and save this to a script called something like and run bash It expects sudo access.

#!/usr/bin/env bash
set -x
cd /tmp
rm -rf node

set -ue
git clone git://

cd node
git checkout v0.10.20

./configure --prefix=/usr
sudo make install

# vim: ft=sh:

Get the gist.