安装测试node.js

1. wget http://nodejs.org/dist/v0.8.7/node-v0.8.7.tar.gz
2../configure 
3.make install
遇到问题:
ImportError: No module named bz2
解决办法安装bzip2-devel 重装python
1).yum install bzip2-devel
2).wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
tar jxvf Python-2.7.3.tar.bz2  
cd Python-2.7.3  
./configure  
make && make install 
4.cd node-v0.8.7 
./configure
make install
5.代码测试
代码如下
vi test.js
str="2,2,3,5,6,6";  
var strs= new Array();  
 
strs=str.split(",");  
console.log(strs);


执行
[root@xen189v-t ~/node-v0.8.7]# node test.js
[ '2', '2', '3', '5', '6', '6' ]
 

你可能感兴趣的:(安装测试node.js)