Install Node. js on CentOS

Source: Internet
Author: User
Tags install node

Install Node. js on CentOS

Install Node. js on CentOS (if you want to learn Node. js on Linux, you can check it out ).

Note:

Use the CentOS System for nodejs installation. The nodejs version is v0.8.7.

1. Download nodejs first:

# Wget http://nodejs.org/dist/v0.8.7/node-v0.8.7.tar.gz

2. decompress the file

# Tar xvf node-v0.8.7.tar.gz

3. Go to the extract directory.

# Cd node-v0.8.7

4. Check the configurations.

#./Configure

Error message:

Exception: Call to '(echo | $ (echo $ {CXX_host:-$ (which g ++)})-m32-E-

>/Dev/null 2> & 1) & echo "-m32" | true 'returned exit status 0. while

Loading dependencies of/opt/node-v0.8.7/node. gyp while trying to load

/Opt/node-v0.8.7/node. gyp.

5. If the above error occurs, install gcc-c ++

# Yum install gcc-c ++

6. Installation (Long Time ):

# Make install

7. Check whether the installation is successful. Enter the following command:

# Node-v

If the installation is successful, the corresponding version number is output, for example:

V0.8.7

8. Now you can create a test. js file for testing. The file content is console. log ('Hello World .');

Enter the following command:

# Node test. js

Output:

Hello World.

 

Install and configure the Node. js development environment in javasru 12.04

Getting started with Node. Js [PDF + related Code]

Node. js getting started Development Guide

Install and configure Node. js

Compile and install Node. js in Ubuntu

Node. js details: click here
Node. js: click here

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.