Install node.js from binaries

Here's a quick rundown of how I install node.js in my development environments, which is currently Ubuntu 12.04.1 LTS.

You can get previous versions of node.js from here: http://nodejs.org/dist/

  • wget the desired binaries to the directory of your choice, for me it's ~/devenv

    wget http://nodejs.org/dist/v0.10.7/node-v0.10.7-linux-x86.tar.gz

  • Unzip and extract the binaries:

    tar -zxvf node-v0.10.7-linux-x86.tar.gz

  • Create a symbolic link for node that points to the new directory

    ln -s node-v0.10.7-linux-x86 node

  • Add the bin path to your profile using the editor of your choice (VIM for me)

    vim ~/.profile

    Add the following line at the end of ~/.profile

    PATH=$PATH:$HOME/devenv/node/bin

That's all there is to it. To install a different version you simply pull down the new version and change the symbolic link!

comments powered by Disqus