node. JS installation Configuration

Source: Internet
Author: User
Tags install node

node. JS installation Configuration

We'll show you how to install node. js on Windows and Linux.

This installation tutorial takes the node. JS v0.10.26 version as an example.

The node. JS installation package and source code are: http://www.nodejs.org/download/.

Choose the node. JS installation package You need based on the different platform systems.

Note: Installing node. js on Linux requires Python 2.6 or 2.7, and it is not recommended to install Python 3.0 or later.

Install node. js on WINDOWV

Windows installation package (. msi) :

32-bit installation package: Http://nodejs.org/dist/v0.10.26/node-v0.10.26-x86.msi

64-bit installation package: Http://nodejs.org/dist/v0.10.26/x64/node-v0.10.26-x64.msi

Installation steps:

Step 1: Double-click the downloaded installation package Node-v0.10.26-x86.msi as follows:

Step 2: Click on the run above, the following screen will appear:

Step 3: Tick the Accept Agreement option and click the Next button:

Step 4:node.js The default installation directory is "C:\Program files\nodejs\", you can modify the directory and click Next:

Step 5: Click the tree icon to select the installation mode you want, then click Next Step Next (next)

Step 6: Click Install to start installing node. js. You can also click Back to modify the previous configuration. And then click Next (Next):

Installation process:

Click the Finish button to exit the Setup wizard.

To detect if the PATH environment variable is configured with node. js, click start = "Run =" Enter "cmd" + = Enter the command "path" and output the following result:

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-5.5\ Bin; C:\Program files\nodejs\; C:\USERS\RG\APPDATA\ROAMING\NPM

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

Check the node. JS version

Windows binary file (. exe) installation :

32-bit installation package: Http://nodejs.org/dist/v0.10.26/node.exe

64-bit installation package: Http://nodejs.org/dist/v0.10.26/x64/node.exe

Installation steps

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

Clicking the Run button will show the command-line window:

Version test

Enter the directory where the Node.exe is located, as follows:

If you get the above output, you have successfully installed node. js.

Install Node.jsubuntu source installation on Linux

The following section describes the installation of node. js under Ubuntu Linux. Other Linux systems, such as CentOS, are similar to the following installation steps.

Get the node. JS source code on Github:

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

Modify Directory Permissions:

Use './configure ' to create the compiled file.

Compile: Make.

Complete the installation: make install.

Finally we enter the ' node--version ' command to see if node. js is installed successfully.

Ubuntu apt-get Command Installation

The command format is as follows:

sudo apt-get install nodejssudo apt-get install NPM
Installing Nodejs under CentOS

1, download the source code, you need to download the latest Nodejs version in http://nodejs.org/, this article takes v0.10.24 as an example:

cd/usr/local/src/wget http://nodejs.org/dist/v0.10.24/node-v0.10.24.tar.gz

2. Extracting source code

Tar zxvf node-v0.10.24.tar.gz

3. Compile and install

CD node-v0.10.24. /configure--prefix=/usr/local/node/0.10.24Makemake Install

4, configure Node_home, enter the profile edit environment variable

Vim/etc/profile

Set the NODEJS environment variable to add the following on the export PATH USER LOGNAME MAIL HOSTNAME histsize histcontrol Line:

 for nodejsexport node_home=/usr/local/node/0.10.24export PATH= $NODE _home/bin: $PATH

: Wq Save and exit, compile/etc/profile make configuration effective

Source/etc/profile

Verify that the installation configuration is successful

Node-v

Output v0.10.24 indicates a successful configuration

NPM Module Installation Path

/usr/local/node/0.10.24/lib/node_modules/

Note: The NODEJS website provides a compiled Linux binary package that you can also download and apply directly.

Node. JS Installation Configuration

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: info-contact@alibabacloud.com 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.