Junjun&3588 个人博客

-个人博客-
热爱技术,喜欢科技. Hello Coder!!
  1. 首页
  2. 技术点滴
  3. Linux
  4. 正文

CentOS 6.4 安装 node.js

2015-03-08 4090点热度 0人点赞 4条评论

nodejs 处理高并发场景性能高。

目前用来承担项目的chat系统

 

进入 https://nodejs.org/download/ 选择最新版本

wget http://nodejs.org/dist/v0.12.0/node-v0.12.0.tar.gz

tar -xf node*

安装支持库

yum install gcc openssl-devel gcc-c++ compat-gcc-34 compat-gcc-34-c++

cd no*

./configure --prefix=/usr/local/node

make

make install

ln -s /usr/local/node/bin/* /usr/sbin/

 

 

test code

var http = require('http');
http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World 3588.usn');
}).listen(3588, '127.0.0.1');
console.log('Server running at http://127.0.0.1:3588/');
标签: 暂无
最后更新:2015-03-08

admin3588

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

  • junjun3588

    which node cd /pathThis is all that is added by Node.JS.rm -r bin/node bin/node-waf include/node lib/node lib/pkgconfig/nodejs.pc share/man/man1/node.1

    2015-03-08
    回复
  • junjun3588

    which node cd /pathThis is all that is added by Node.JS.rm -r bin/node bin/node-waf include/node lib/node lib/pkgconfig/nodejs.pc share/man/man1/node.1

    2015-03-08
    回复
  • junjun3588

    NPMnpm 升级非常方便, 直接使用 npm 就可以1$ npm update -g npmnpm 卸载方法如下1$ sudo npm uninstall npm -g如果该方法失败, 可以先获取 npm 源代码, 然后$ sudo make uninstall

    2015-03-09
    回复
  • junjun3588

    NPMnpm 升级非常方便, 直接使用 npm 就可以1$ npm update -g npmnpm 卸载方法如下1$ sudo npm uninstall npm -g如果该方法失败, 可以先获取 npm 源代码, 然后$ sudo make uninstall

    2015-03-09
    回复
  • razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
    取消回复

    这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理。

    COPYRIGHT © 2022 Junjun&3588 个人博客. ALL RIGHTS RESERVED.

    Theme Kratos Made By Seaton Jiang