Install the NODE.JS__JS on the CentOS5.6

Source: Internet
Author: User
Tags install node using git joyent

I've heard of Node.js before, but I know it can be applied to the server, but I don't know a lot of specific things. Today in Qcon listened to Shong share "node.js out of the browser JavaScript," Immediately after the impulse to try immediately.

Node.js installation steps are relatively simple, not too many detours, the main reference documents:

Building and installing Node.js

1. Install Python

According to the reference documentation, compiling the installation node.js from the source code requires python2.6 or more, while the Yum install python.x86_64 can only get 2.4.3, so you also need to compile and install Python via source. Here's the command:

# wget http://www.python.org/ftp/python/3.2.2/Python-3.2.2.tgz
# tar xzvf python-3.2.3.tgz
# CD Python-3.2.2
#./configure
# make
# make Test
# make install

After the installation is complete, execute the python command and go to the Python Command line window.

2. Install Node.js

Follow the instructions on the document to never succeed with git checkout code, whether using Git://github.com/joyent/node.git or https://github.com/joyent/node.git. So you can only download and then compile the installation from the GitHub network, the following steps are specified:

# wget Https://nodeload.github.com/joyent/node/tarball/master
# mv Master node.tar.gz
# tar xzvf node.tar.gz
# CD Joyent-node-84d0b1b
#/configure--prefix=/opt/node/
# make
# make install
# Cd/usr/bin
# ln-s/opt/node/bin/node node
# ln-s/opt/node/bin/node-waf Node-waf

3. Install NPM

NPM is the package manager used to install the Node.js library, and the installation commands are fairly straightforward:

# Curl Http://npmjs.org/install.sh | Sh


At this point, the installation is complete.




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.