[Node.js hack] Install Node.js on windows step by step.

Your thinking is right! Node.js never run on Windows box. Node.js can install and run smoothly on some Unix/BSD base system. But there have some easy and nice tricks to install in a windows box. Here i have discuss on it--->

Step 1 – Ok, first you have to  download and install VirtualBox orVMWare Player. VirtualBox will be great and free for use.

Step 2 – The download Turnkey Linux core appliance and unzip it. Now you can able to make a virtual linux/unix environment on your windows.

Step 3 – Import the Turnkey core appliance into VirtualBox.
turnkey_step_1
turnkey_step_2

Choose the .ovf file in the Turnkey directory you unzipped earlier.
turnkey_step_4
Click next and review the settings, making any changes as you see fit. The defaults should work fine. Then click import.
turnkey_step_3
Once Virtualbox finishes importing the virtual machine, you can start it up.
Assuming your network is configured correctly, the virtual machine will grab an IP from your DHCP server and be ready to go.
turnkey_startup
Step 4 – At this point you can either SSH into the virtual machine or you can connect using the web shell at the address indicated in the startup screen. Initially you can connect using as the root account with no password. You are almost ready to start installing node.js. First type “apt-get update” at the command line to make sure you have all the latest package information.

Step 5 – Install the developer tools you need to get and build node.js. Node.js isn’t packaged as a binary, you have to build it from source. Luckily it includes it’s dependencies and is pretty easy to build. But first we need to get a compiler. Type “apt-get install build-essential” and hit return. A lot of text will fly past, if it asks you if you want to go ahead press “y”.

Step 6 – Install Git. Now you’ve got a compiler installed, we have to install git so we can fetch node.js from the repository. At the command prompt type “apt-get install git”. Once that is complete, type “apt-get install git-core”.

Step 7 – Clone the node.js Git repository. If you want to put node.js is a specific directory, go ahead and make it then “cd” into the new directory. At the command prompt, type “git clone git://github.com/ry/node.git“.

Step 8 – configure the source for building. type “cd node” and change into the node directory that Git created. Type “./configure”. You may see a few “fail” messages. Don’t worry about them.

Step 9 – Build node.js. Type" “make” at the command prompt. Get a sandwich or a nice cool drink. It doesn’t take very long, but it’s not very exciting unless the Matrix screensaver is your favorite screen saver.

Step 10 – Install node.js and start build applications. Type “make install” once the build is complete. Once that is complete,you can type “node” at the command prompt and you should see the standard help information fly by.

This tutorial has taken from here.

No comments: