Note: This a guide to installing from source code, if you want to install the “easy way” then read the official guide for installing using a package manager

So there are many examples of how to compile Node.js on a server, including the official install guide. However none of the ones I have read truly explained how to install Node.js on a fresh/clean system.

Assumption: You have sudo/root access to a clean / freshly installed Linux system. This guide is based on Debian, so any Debian based systems (i.e. Ubuntu) should be the same.

Step 1.Verify system is up to date

$ apt-get update

Step 2. Install all the Node.js prerequisites.

$ apt-get install git-core python openssl g++ libssl-dev pkg-config curl

Step 3. Download and compile Node.js

$ git clone git://github.com/ry/node.git

$ cd node

$ ./configure

$ make

$ make install

All done! Node is now fully installed. You can verify by running the following command

$ node -v

It should out put something like, “v0.5.11-pre”. Next Steps:

You will probably want to play around with the simple chat application, also install the excellent npm node package manager.

Enjoy!

Leave a Reply

Your email address will not be published. Required fields are marked *

*