日期:2014-05-16  浏览次数:20551 次

在Linux下安装 NodeJS

?

? ??NodeJS安装的前提条件是系统中必须有python,版本在2.5或者更高,不支持3.0(含)以上的python版本。安装前先检查一下系统中的python版本。

?

? ? 以安装node 0.6.7版本为例,在官网下载源代码包后,在shell中键入以下命令:

tar -zxf node-v0.6.7.tar.gz
cd node-v0.6.7
./configure
make
sudo make install

?

? ? 也可以通过版本库的方式安装,在shell中键入以下命令:

git clone https://github.com/joyent/node.git
cd node
git checkout v0.6.7
./configure
make
sudo make install