Install Node.js From Source via GIT

Yeah!!! I am going to give to try Node.js by creating small product. But don’t have Node.js developing environment ready in my work station. So, I installed by compiling from source via GIT repo. I can switch and update it easily. It’s quite easy. Just follow me.

If you don’t have installed GIT in your pc, then run the following commands, neither skip the following commands…

sudo apt-get update
sudo apt-get install build-essential openssl libssl-dev pkg-config git-core

GIT installation is done. Now, clone the repository at /usr/local/src.

cd /usr/local/src
sudo git clone git://github.com/joyent/node.git

Run the configure scritp which will actually ensure that nodejs is install globally in the system’s environment.

sudo ./configure

Then, run the following command for compiling and installing it…

sudo make
sudo make install

One of the main reasons to choice GIT is that easy updating nodejs. It’s make easy updating the nodejs.
Just you will have to pull the latest source codes. And then repeat the whole installation process..

1
2
3
4
5
cd /usr/local/src/node
sudo git pull origin master
sudo ./configure
sudo make
sudo make install

Update and re-installation is done. Let’s make an example to test that nodejs is working well.

cat > ~/server.js <

Now open the browser, type http://localhost:1337. You will get “Hello world”. it’s done 🙂

 

Eftakhairul Islam

Hi, I'm Eftakhairul Islam, a passionate Software Engineer, Hacker and Open Source Enthusiast. I enjoy writing about technical things, work in a couple of startup as a technical advisor and in my spare time, I contribute a lot of open source projects.

 

9 thoughts on “Install Node.js From Source via GIT

  1. I’m curious to find out what blog platform you have been using?

    I’m having some minor security problems with my latest site
    and I’d like to find something more secure. Do you have any solutions?

Leave a Reply to condo insurance online quote Cancel reply

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

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Read previous post:
convertNumericType error in Zend Framework 2 with Doctrine MongoDB ODM

One stupid error kicked my ass for the last few days (Sorry for writing in this way). Recently I am...

Close