How to install Node.js from source?

Node.js is not included in common Linux distributions like CentOS, Ubuntu, Debian and RHEL by default. Then How can we install Nodejs on these systems from source code?

The installation is basically the same as we install any other application from source code. That’s download, compile and install.

Here is a step by step guide for you to get Nodejs installed on Debian/Ubuntu:

sudo apt-get update && sudo apt-get install git-core curl build-essential openssl libssl-dev
git clone
cd node
git checkout v0.10.26  #(You can get the latest version from its official site
./configure --openssl-libpath=/usr/lib/ssl
sudo make install

This is the general way to install Nodejs from source, and if you want to install nodejs based tools, you can then use npm for that,

npm install -g dnc

Leave a comment

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