Debian上安装Node.js和npm
2016-05-03 11:31
375 查看
一、更新你的系统
二、安装Node.js
首先我们先从github上将Node.js库克隆到本地:
如果你需要安装特定版本的Node,可以如下操作:
然后可以编译和安装Node:
安装完毕,我们就可以在命令行里面输入以下命令以便确认Node是否安装完毕:
这个命令会输出你安装Node版本信息,如果你电脑上面输出和下面的类似,那恭喜你了,安装Node成功。
三、安装NPM
这个很简单,NPM官方提供了安装NPM的脚本,所以我们把这个脚本下载下来执行一下就可以:
查看源代码
打印帮助
如果你输入
1 | iteblog # sudo apt-get update |
2 | iteblog # sudo apt-get install git-core curl build-essential openssl libssl-dev |
首先我们先从github上将Node.js库克隆到本地:
1 | iteblog # git clone https://github.com/joyent/node.git |
2 | iteblog # cd node |
1 | iteblog # git tag # 这个命令将会显示Node的所有版本的列表 |
2 | iteblog # git checkout v0.10.33 |
1 | iteblog # ./configure |
2 | iteblog # make |
3 | iteblog # sudo make install |
1 | iteblog # node -v |
2 | v0.10.33 |
三、安装NPM
这个很简单,NPM官方提供了安装NPM的脚本,所以我们把这个脚本下载下来执行一下就可以:
查看源代码
打印帮助
1 | iteblog # wget https://npmjs.org/install.sh --no-check-certificate |
2 | iteblog # chmod 777 install.sh |
3 | iteblog # ./install.sh |
4 | iteblog # npm -v |
5 | 2.7.6 |
npm -v,返回的是一个类似上面的版本信息,那么NPM也就安装成功了!
相关文章推荐
- LeetCode 24. Swap Nodes in Pairs
- 《深入浅出Node.js》学习笔记——(一)Node简介
- 【LeetCode】LeetCode——第19题:Remove Nth Node From End of List
- Node.js其他模块
- 让nodeJS支持ES6的词法----babel的安装和使用
- nodejs的一些日常操作
- 菜鸟学习nodejs--Socket.IO二(聊天服务器)
- Nodejs调试环境搭建
- 51node1091 线段的最长交集(贪心)
- 《Nodejs开发加密货币》之六:Commander介绍
- Ubuntu 14.04 / 15.04 node.js V4.0.0
- Light oj 1094 - Farthest Nodes in a Tree【树的直径】
- 开发基于NodeJS的秘室聊天室
- leetcode-116. Populating Next Right Pointers in Each Node
- 43-Reverse Nodes in k-Group
- Light OJ 1094 - Farthest Nodes in a Tree【树的直径 两次bfs】
- leetcode:25. Reverse Nodes in k-Group
- 【LeetCode】Swap Nodes in Pairs 解题报告
- [LeetCode#2][C]Add Two Numbers
- NodeJS学习笔记