`
zhelong111
  • 浏览: 183564 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

CentOS安装node.js全解

 
阅读更多
1、下载node.js源码
wget http://nodejs.org/dist/v0.10.33/node-v0.10.33.tar.gz

2、解压
tar zxvf node-/v0.10.33.tar.gz

3、安装
make
make install

4、查看版本
node -v

5、编写测试页

vi example.js
[plain] view plaincopy
var http = require('http');  
http.createServer(function (req, res) {  
    res.writeHead(200, {'Content-Type': 'text/plain'});  
        res.end('Hello World\n');  
}).listen(1337, "192.168.85.xx");  
console.log('Server running at http://192.168.85.<span style="color:#000000;">xx</span>:1337/');

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics