1. 从node.js官网下载最新版的node.js安装包,node.tar.gz

wget https://nodejs.org/dist/v4.3.1/node-v4.3.1.tar.gz
    (如果没有wget命令需要先安装wget  yum -y install wget)

2. 如果没有g++需要

yum -y install gcc-c++

2. 更新centos上的python

yum -y update python

3. 解压

tar zxvf node.tar.gz

4. 编译安装

./configure

make && make install

5. 测试node命令

node

6. hello,world程序

touch helloWorld.js

vi helloWorld.js

var http = require('http');

http.createServer(function(res, req){

res.writeHead(200, {

'Content-Type': 'text/plain'

});

res.end('Hello, world!');

});

node helloWorld.js

最新文章

  1. UINavigationController push时,页面卡顿
  2. PAT (Basic Level) Practise:1039. 到底买不买
  3. poj 2356 Find a multiple(鸽巢原理)
  4. Qt入门-字符串类QString
  5. Maven之(一)Maven是什么
  6. magento里获取用户姓名
  7. Interlocked原子函数陷阱
  8. THINKPHP 3.2 PHP SFTP上传下载 代码实现方法
  9. [js高手之路] 跟GhostWu一起封装一个字符串工具库-扩展字符串位置方法(4)
  10. WebFTP安装说明
  11. 为VIP解决问题时写的源码
  12. python中的包与模块
  13. eclipse调试远程tomcat
  14. 填一个laravel视图缓存没有及时更新的坑
  15. Centos7更改yum源
  16. Bellman_ford模板
  17. win7下iis的配置问题
  18. Ubuntu17安装maven3.5.2
  19. Linux下使用logrotate实现日志切换
  20. sql distinct去除重复

热门文章

  1. silverlight 4 tools for vs2010无法在vs2010 SP1上安装的解决办法
  2. matlab jet color mapping C / C++ / VC 实现
  3. jQuery问题集锦
  4. JavaScript instanceof 运算符深入剖析
  5. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:create (default-cli) on project standalone-pom: Unable to parse configuration of 3: mojo org.apache.maven.plugins:
  6. GO语言数组和切片实例详解
  7. Linux下安装libiconv使php支持iconv函数
  8. 【The Expendables】团队博客目录
  9. MVC的理解
  10. OKhttp初步