yum install gcc-c++ openssl-devel wget http://nodejs.org/dist/v0.6.15/node-v0.6.15.tar.gz tar -xzvf node-v0.6.15.tar.gz cd node-v0.6.15 ./configure make make install
快速安装, 到Nodejs官网下载最新的安装包, yum安装 gcc-c++ openssl-devel
var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello, My is Node.js\n'); }).listen(80, "127.0.0.1"); console.log('Server running at http://127.0.0.1:80/');
评论前必须登录!
注册