一、利用包管理器安装 node.js
- 利用 curl 获取源代码
# apt-get update
# curl -sL https://deb.nodesource.com/setup_6.x | bash -
运行结束后使用 apt-get install nodejs
即可安装 node 6.x 版本。
二、使用源码编译安装
先安装一些node.js必要的包
# apt-get update
# apt-get install python gcc make g++
获取 nodejs 的源代码
从 http://nodejs.org/
上可以获取到想要的版本的下载地址。
。
。
。
。
。
。
后面就是编译安装的常规步骤了,有空再补一下。。。