Installing Node.js on Windows and Linux
There is a number of ways to install Node.js on Linux, and windows. Here are some instructions for installing Node.js on windows and Linux distributions.
Current version: : v0.10.26
Installing Node.js on Windows
Windows Installer (.msi) :
Download 32 bit from here : http://nodejs.org/dist/v0.10.26/node-v0.10.26-x86.msi
Download 64 bit from here : http://nodejs.org/dist/v0.10.26/x64/node-v0.10.26-x64.msi
Installation in 32-bit -
Step - 1 : Double clicking on node-v0.10.26-x86.msi the following screen will come -
Seep - 2 : Clicking on Run button the following screen will come -
Step -3 : Accept the license agreement and click on next button :
Step - 4 : Here "C:\Program Files\nodejs\" is the default folder name, you can change the folder name. Click on next -
Step - 5 : Click the icons in the tree to change the way features will be installed , Click next -
Step-6 : Click Install to begin the installation. Click Back to review or change any your installation settings. Click cancel to exit the wizard :
Installation in progress :
Click the Finish button to exit Setup wizard.
Let check the path command which sets the command path in the PATH environment variable, which is the set of directories used to search for executable files. Used without parameters, path .
PATH=C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Windows\system32; C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\; c:\python32\python;C:\MinGW\bin;C:\Program Files\GTK2-Runtime\lib; C:\Program Files\MySQL\MySQL Server 5.5\bin;C:\Program Files\nodejs\; C:\Users\rg\AppData\Roaming\npm
Now you can check the version of Node :
To get Node REPL type node and press enter :
Windows Binary (.exe) :
Download 32 bit from here : http://nodejs.org/dist/v0.10.26/node.exe
Download 64 bit from here : http://nodejs.org/dist/v0.10.26/x64/node.exe
Installation in 32-bit -
Step - 1 : Double clicking on Node.exe the following screen will come :
Clicking on Run button the following Node's REPL command line will come :
Version test :
Goto the dir where node.exe is present (as node.exe is not set in a search path for executable files) and execute the following command.
If you get an output like shown above, then you have successfully installed Node.js in your machine.
Installing Node.js on Linux
In the following part of the tutorial, we will see how to install Node.js on Ubuntu Linux. If you are installing Node.js from source, then installation process will be similar in all linux operating systems.
Clone Node.js from the Github using the following command.
After a while, you will find that the Node source code is copied to the 'node' folder.
Issuing the following command, make sure that you have proper permission set on node folder.
Using './configure' create the make file we will use in a moment.
Issue make install to complete the installation.
Once you arrived till the last command showed, you may arrive at any directory in your file system and issuing 'node --version' will show you the version of the Node.js you have ended up installing.
Using package manager
Beside installing from source code, you may install Nodejs using the package manager also. In the following part of the tutorial, we will discuss how to install nodejs on Ubuntu using package manager.
Note that, while issuing the following commands, we have logged in as root. if you are not logged in as a different user (which is common), you may need to add 'sudo ' before all of the commends shown below.
Run apt-get update to make sure that your system is upto date.
Nodejs has some prerequisites. Using apt-get, install those now.
Add the required repository to install nodejs.
Now install nodejs issuing the following command.
Now, run node --version command from the prompt shown above.
If you are using any other Linux distribution than Ubuntu, you got to find the proper repository for that.
New Exercises:R Programming