Building Node.js on Linux is fairly simple, as there are few dependencies. This is how I did it on Debain 6 (Squeeze). At the time of writing the current release of Node.js was 0.6.15. You’ll need to adjust the intructions below to reflect the version you’re building.
Update: I have also successfully tested these instructions with node.js 0.6.17 on Ubuntu 12.04.