Latest web development tutorials

Node.js installation configuration

This chapter we will introduce you to install Node.js on a window and Linux method.

This installation tutorial Node.js v4.4.3 LTS (Long Term Support) version, for example.

Node.js installation package and source code download at: .


You can choose the package you need to install Node.js depending on platform.

Node.js version history Download:

Note: Install Node.js need to install on Linux Python 2.6 or 2.7, is not recommended to install Python 3.0 or later.

Node.js installation on Window

You can use the following two ways to install.

1, Windows installation package (.msi)

32-bit installation package Download:

64-bit installation package Download:

In the examples herein v0.10.26 version, for example, similar to other versions, the installation steps:

Step 1: Double-click the downloaded installation package v0.10.26, as follows:


Step 2: Click the above Run (Run), the following interface:


Step 3: Select the option to accept the agreement, click next (Next) button:


Step 4: Node.js default installation directory is "C: \ Program Files \ nodejs \", you can modify the directory, and click next (next):


Step 5: Click the tree icon to select the mode you need to install, and then click Next next (Next)


Step 6: Click Install (install) to start the installation Node.js. You can also click Back (Back) to modify the previous configuration. And then click next (next):


Installation process:


Click Finish (complete) button to exit the installation wizard.


Detection PATH environment variable is configured with Node.js, click Start = "run =" enter "cmd" => Enter the command "path", the following output:

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\;

We can see the environment variable already contains C: \ Program Files \ nodejs \

Check Node.js version


2, Windows binaries (.exe) installation

32-bit installation package Download:

64-bit installation package Download:

installation steps

Step 1: Double-click the downloaded installation package Node.exe, the following interface will appear:


Command-line window, click Run (Run) button will appear:


Test version

Enter node.exe where the directory, as follows:


If you get the above output, indicating that you have successfully installed Node.js.

Ubuntu is installed Node.js

Node.js installation source

The following section describes how to install Node.js we will under Ubuntu Linux. Other Linux systems, such as Centos, etc. similar to the following installation steps.

Get Node.js source on Github:

$ sudo git clone
Cloning into 'node'...

Modify directory permissions:

$ sudo chmod -R 755 node

Use./configure create the compiled file and follow:

$ cd node
$ sudo ./configure
$ sudo make
$ sudo make install

View node version:

$ node --version

Ubuntu apt-get command to install

Command format is as follows:

sudo apt-get install nodejs
sudo apt-get install npm

CentOS installed Node.js

1, download the source code, you need to download the latest version Nodejs, paper v0.10.24 example:

cd /usr/local/src/

2, extract the source

tar zxvf node-v0.10.24.tar.gz

3, compile and install

cd node-v0.10.24
./configure --prefix=/usr/local/node/0.10.24
make install

4, configuration NODE_HOME, enter profile editing environment variables

vim /etc/profile

Nodejs set environment variables, add the following in the aboveexport PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROLline:

#set for nodejs
export NODE_HOME=/usr/local/node/0.10.24
export PATH=$NODE_HOME/bin:$PATH

: Wq to save and exit, the compiler / etc / profile to validate the configuration

source /etc/profile

Verify successful installation configuration

node -v

Output configuration is successful v0.10.24

npm module installation path


NOTE: Nodejs official website provides precompiled Linux binaries, you can download it directly.