CentOS编译安装nodejs
2024-10-14 17:03:58
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
最新文章
- UINavigationController push时,页面卡顿
- PAT (Basic Level) Practise:1039. 到底买不买
- poj 2356 Find a multiple(鸽巢原理)
- Qt入门-字符串类QString
- Maven之(一)Maven是什么
- magento里获取用户姓名
- Interlocked原子函数陷阱
- THINKPHP 3.2 PHP SFTP上传下载 代码实现方法
- [js高手之路] 跟GhostWu一起封装一个字符串工具库-扩展字符串位置方法(4)
- WebFTP安装说明
- 为VIP解决问题时写的源码
- python中的包与模块
- eclipse调试远程tomcat
- 填一个laravel视图缓存没有及时更新的坑
- Centos7更改yum源
- Bellman_ford模板
- win7下iis的配置问题
- Ubuntu17安装maven3.5.2
- Linux下使用logrotate实现日志切换
- sql distinct去除重复
热门文章
- silverlight 4 tools for vs2010无法在vs2010 SP1上安装的解决办法
- matlab jet color mapping C / C++ / VC 实现
- jQuery问题集锦
- JavaScript instanceof 运算符深入剖析
- [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:
- GO语言数组和切片实例详解
- Linux下安装libiconv使php支持iconv函数
- 【The Expendables】团队博客目录
- MVC的理解
- OKhttp初步