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.