码迷,mamicode.com
首页 > Web开发 > 详细

CentOS上安装NodeJs

时间:2014-08-07 12:23:49      阅读:252      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   os   io   ar   cti   

(1)参照:http://www.cnblogs.com/zhangqingsh/archive/2013/04/15/3022583.html  安装Python2.7

(2)安装Nodejs

  yum install gcc-c++ openssl-devel (nodejs需要openssl)

  备注:安装python前要安装yum install bzip2*(nodejs需要bzip)


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

  tar zxvf node-v0.10.30.tar.gz

  cd node-v0.10.30

  ./configure

  make && make install

(3)验证

  node -h

Usage: node [options] [ -e script | script.js ] [arguments]
node debug script.js [arguments]

Options:
-v, --version print node‘s version
-e, --eval script evaluate script
-p, --print evaluate script and print result
-i, --interactive always enter the REPL even if stdin
does not appear to be a terminal
--no-deprecation silence deprecation warnings
--trace-deprecation show stack traces on deprecations
--v8-options print v8 command line options
--max-stack-size=val set max v8 stack size (bytes)

Environment variables:
NODE_PATH ‘:‘-separated list of directories
prefixed to the module search path.
NODE_MODULE_CONTEXTS Set to 1 to load modules in their own
global contexts.
NODE_DISABLE_COLORS Set to 1 to disable colors in the REPL

Documentation can be found at http://nodejs.org/

      

 

CentOS上安装NodeJs,布布扣,bubuko.com

CentOS上安装NodeJs

标签:style   blog   http   color   os   io   ar   cti   

原文地址:http://www.cnblogs.com/zhangqingsh/p/3896446.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!