Node. js getting started Tutorial: install and configure Node. js on windows and Linux

Source: Internet
Author: User
Tags install node
This article mainly introduces Node. js getting started Tutorial: install and configure Node on windows and Linux. the js method is illustrated in the following illustration. The detailed steps are to learn how to install node. js is an excellent tutorial. For more information about how to install Node on Windows and Linux, see the following section. js method.

This tutorial uses Node. js v0.10.26 as an example.

The Node. js installation package and source code are: /.

Select the Node. js installation package you need based on different platform systems.

Note:To install Node. js on Linux, Python 2.6 or 2.7 is required. We do not recommend that you install Python 3.0 or later.

Install Node. js on ipvwv

Windows Installation Package (. msi):

32-bit installation package:

64-bit installation package:

Installation steps:

Step 1: double-click the downloaded installation package node-v0.10.26-x86.msi, as shown below:

Step 2: Click Run. The following page is displayed:

Step 3: select the accept protocol option and click next:

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

Step 5: Click the tree icon to select the desired installation mode, and then click next (next)

Step 6: Click Install to Install Node. js. You can also click Back to modify the previous configuration. Then click next ):

Installation Process:

Click Finish to exit the installation wizard.

Check whether Node. js is configured for the PATH environment variable. Click Start = run = and enter "cmd" => enter the command "path". The following result is output:

The Code is as follows:

PATH = C: \ oraclexe \ app \ oracle \ product \ 10.2.0 \ server \ bin; C: \ Windows \ system32; 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 Server 5.5 \ bin; C: \ Program Files \ nodejs \; C: \ Users \ rg \ AppData \ Roaming \ npm

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

Check the Node. js version

Install Windows binary file (.exe):

32-bit installation package:

64-bit installation package:

Installation Steps

Step 1: double-click the downloaded installation package Node.exe. The following page is displayed:

Click Run to display the command line window:

Version Test

Enter the directory where node.exe is located, as shown below:

If you obtain the preceding output, you have successfully installed Node. js.

Install Node. js Ubuntu on Linux

The following section describes how to install Node. js in Ubuntu Linux. For other Linux systems, such as Centos, follow these steps.

Get the Node. js source code on Github:

After the download is complete, change the source package name to 'node '.

Modify directory permissions:

Use './configure' to create a compilation file.

Compile: make.

Complete the installation: make install.

Finally, run the 'node -- version' command to check whether node. js is successfully installed.

Install nodejs in centOS

1. Download the source code. download the latest nodejsrepository at this document uses v0.10.24as an example:

The Code is as follows:


2. decompress the source code

The Code is as follows:

Tar zxvf node-v0.10.24.tar.gz

3. Compile and install

The Code is as follows:

Cd node-v0.10.24./configure -- prefix =/usr/local/node/0.10.24makemake install

4. Configure NODE_HOME and enter the profile to edit the environment variable.

The Code is as follows:


Set the nodejs environment variable inExport PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROLAdd the following content to a row:

The Code is as follows:

# Set for nodejsexport NODE_HOME =/usr/local/node/0.10.24export PATH = $ NODE_HOME/bin: $ PATH

: Wq save and exit. Compile/etc/profile to make the configuration take effect.

The Code is as follows:


Verify whether the configuration is successfully installed

The Code is as follows:


V0.10.24 indicates that the configuration is successful.

Npm module installation path

The Code is as follows:


Note:The official node. js website provides compiled Linux Binary packages. You can download them and apply them directly.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.