How to Install or Setup Node.js Enviroment on Windows and Ubuntu Part-2

node.js

Hello all , Hope you doing great! Today’s tutorial is very quick and short today will do some practical approach towards Node.js and its installation on windows and ubuntu operating systems.

As you we have discussed in our previous tutorial that what is Node,js and why it is so necessary to use it.If you haven’t learnt or see previous tutorial you can look http://androidarena.co.in/what-is-node-js-and-whats-the-use-of-node-js-part-1/ . So, Lets start quickly how to setup Node.js on Windows and Ubuntu .You can check out the video tutorial for this.

Lets start – On Windows

Windows is a very good operating system and installing a Node.js is very easy and a sweetcup cake . you have to go to

for 64 bit – http://nodejs.org/dist/v0.10.26/x64/node-v0.10.26-x64.msi

for 32 bit – http://nodejs.org/dist/v0.10.26/node-v0.10.26-x86.msi

Or simply you can goto http://nodejs.org/download/ and you can choose .msi format for your supported operated system.

installnode

 

Now After downloading just setup it like double click on downloaded file and press Next and then allow firewall if appears and finish.It means your node is installed successfully.Now lets check it node is installed or not .

Goto you cmd and type node -v .

cmd_node

If you see the version of Node it means your node is installed with this version.

Now on Ubuntu –

All those who are using Ubuntu can install it from repository by tying a command –

sudo apt-get install nodejs

Another Method to install it on Ubuntu –

Alternate Method to install on Ubuntu –

Install the dependencies by

sudo apt-get install g++ curl libssl-dev apache2-utils

–> Download Node.js from the given link  http://nodejs.org/dist/v0.10.26/node-v0.10.26.tar.gz .

–> Extract it on your desire directory.

–> Now switch to your location where you extract your files via terminal.

–>Enter the following commands .

./configure
sudo make
sudo make install

Now testing a “Hello androidarena welcome to node.js” on particular port number on localhost .

index.js

My port number is 3000 and we can see output at 127.0.0.1:3000 but first we have to open cmd and goto your directory where save your index.js .

cmd_server

 

And you can goto your browser and type 127.0.0.1:3000 and see the output –

Hello androidarena.co.in welcome to node.js .

So comment the section below if you getting any kind of errors and Next tutorial on node will be Connection with Android.