1、在http://nodejs.org/download/官网下载nodejs
2、选择source code 下载
3、将下载的node-v0.10.24.tar.gz放到linux中
4、安装前检查是否安装了make,python,g++
5、将安装包解压:tar -zxvf node-v0.10.24.tar.gz
6、进入文件夹,执行./configure --prefix=安装的路径
7、执行make && make install进行安装
8、执行export PATH=“$PATH:/安装的路径/bin” 将nodejs 加入/etc/profile中,但是这只是对当前会话有用,如果想永久生效就在/etc/profile文件最后
添加PATH=“$PATH:/安装的路径/bin”
9、执行source /etc/profile
10、执行 node -v 查看是否安装成功