TODO:Ubuntu下安装Node

TODO:Ubuntu下安装Node

Node.js 是一个基于 Chrome V8 引擎的 JavaScript 运行环境。Node.js 使用了一个事件驱动、非阻塞式 I/O 的模型,使其轻量又高效。Node.js 的包管理器 npm,是全球最大的开源库生态系统。

node_logo1. 下载安装包node-v6.9.1-linux-x64.tar.xz,如果下载很满,推荐使用xunlei,然后在把代码scp到Ubuntu服务器上。

后缀为xz格式是一个使用 LZMA压缩算法的无损数据压缩文件格式,XZ压缩最新压缩率之王。

可以使用xz –d进行解压,如果要保存源文件,可以是-k参数;-z是压缩,更多参数使用—help进行参看。先解压为tar的文件,然后在tar xvf进行解压。

2. 设置PATH值

export PATH=$PATH:/data/node/node-v6.9.1-linux-x64/bin

也可以写在配置文件.profile或者.bashrc里面

3. 配置npm国内镜像,默认镜像地址为

http://registry.npmjs.org/

修改为

npm config set registry https://registry.npm.taobao.org

4. 到此,node安装完成,可以使用node和npm命令。本文没有使用ubuntu自带的apt-get进行安装,不会安装不必要软件包,卸载也方便,直接删除目录文件夹即可。


wxgzh:ludong86

qrcode_for_gh_6bb1f39ae99c_258

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
填充下面这个程序中所有出现// TODO: fill the code这个任务的地方#include <iostream> #include <cstring> #include "ourstring.h" #include "strlib.h" using namespace std; OurString::OurString(){ // TODO: fill the code } OurString::OurString(const char *str){ // TODO: fill the code } OurString::OurString(const OurString &dstr){ // TODO: fill the code } OurString::~OurString(){ // TODO: fill the code } string OurString::toString() const{ // TODO: fill the code } OurString OurString::subStr(unsigned int start, unsigned int n) const{ // TODO: fill the code } bool OurString::operator > (const OurString &dstr) const{ // TODO: fill the code } bool OurString::operator < (const OurString &dstr) const{ // TODO: fill the code } bool OurString::operator == (const OurString &dstr) const{ // TODO: fill the code } unsigned int OurString::length () const{ // TODO: fill the code } const OurString& OurString::operator = (const OurString &dstr){ // TODO: fill the code } const OurString& OurString::operator = (const char *str){ // TODO: fill the code } char& OurString::operator[](int index){ // TODO: fill the code } const OurString OurString::operator + (const OurString &dstr) const{ // TODO: fill the code } const OurString OurString::operator + (const char *str) const{ // TODO: fill the code } const OurString& OurString::operator += (const OurString &dstr){ // TODO: fill the code } const OurString& OurString::operator += (const char *str){ // TODO: fill the code } ostream & operator<<(ostream &os, const OurString &dstr){ // TODO: fill the code } istream & operator>>(istream &is, OurString &dstr){ // TODO: fill the code }
最新发布
05-29

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值