zoukankan      html  css  js  c++  java
  • 在阿里云 ECS 搭建 nginx https nodejs 环境(三、nodejs)

    在阿里云 ECS 搭建 nginx https nodejs 环境(三、nodejs)

    在阿里云 ECS 搭建 nginx https nodejs 环境(三、nodejs)

    第一步 指定版本源

    执行 curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
    
    setup_8.x 需要安装的版本号,替换数字就行。
    
    vue@ubuntu-vue:~$ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
    

    出现下面这个就说明正在成功安装了!

    
    ## Installing the NodeSource Node.js v6.x repo...
    
    ## Populating apt-get cache...
    
    

    第二步 通过 apt-get 进行下载

    
    + apt-get update
    Hit:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu vue InRelease
    Get:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu vue-updates InRelease [95.7 kB]    
    Get:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu vue-backports InRelease [92.2 kB]  
    Get:4 http://mirrors.tuna.tsinghua.edu.cn/ubuntu vue-security InRelease [94.5 kB]
    Hit:5 http://repo.mysql.com/apt/ubuntu vue InRelease                         
    Fetched 282 kB in 0s (615 kB/s)                    
    Reading package lists... Done
    
    
    
    apt-get update
    Hit:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu vue InRelease
    Get:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu vue-updates InRelease [95.7 kB]    
    Get:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu vue-backports InRelease [92.2 kB]  
    Get:4 http://mirrors.tuna.tsinghua.edu.cn/ubuntu vue-security InRelease [94.5 kB]   
    Hit:5 http://repo.mysql.com/apt/ubuntu vue InRelease                         
    Get:6 https://deb.nodesource.com/node_6.x vue InRelease [3,914 B]
    Get:7 https://deb.nodesource.com/node_6.x vue/main Sources [765 B]
    Get:8 https://deb.nodesource.com/node_6.x vue/main amd64 Packages [960 B]
    Get:9 https://deb.nodesource.com/node_6.x vue/main i386 Packages [959 B]
    Fetched 289 kB in 5s (51.9 kB/s)
    Reading package lists... Done
    
    Run `apt-get install nodejs` (as root) to install Node.js v6.x and npm
    
    

    最后一步 安装 nodejs,执行 apt-get install nodejs !

    vue@ubuntu-vue:~$ sudo apt-get install nodejs
    
    
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following NEW packages will be installed:
      nodejs
    0 upgraded, 1 newly installed, 0 to remove and 90 not upgraded.
    Need to get 10.1 MB of archives.
    After this operation, 50.7 MB of additional disk space will be used.
    Get:1 https://deb.nodesource.com/node_6.x vue/main amd64 nodejs amd64 6.9.1-1nodesource1~xenial1 [10.1 MB]
    Fetched 10.1 MB in 1min 25s (119 kB/s)                                                 
    Selecting previously unselected package nodejs.
    (Reading database ... 60366 files and directories currently installed.)
    Preparing to unpack .../nodejs_6.9.1-1nodesource1~xenial1_amd64.deb ...
    Unpacking nodejs (6.9.1-1nodesource1~xenial1) ...
    Processing triggers for man-db (2.7.5-1) ...
    Setting up nodejs (6.9.1-1nodesource1~xenial1) ...
    
    

    vagrant@ubuntu-vue:~$ node -v
    v8.3.0

    vagrant@ubuntu-vue:~$ npm -v
    5.3.0

    哇~~~终于看到 node 的版本啦~~ 说明,我们已经全部成功的安装了 nodejs 在 linux 下~~
    

    好了~~ 基于 linux(ubuntu) 下的 的nginx 、https、 nodejs 的安装使用,到这里基本算是告一段落了~
    后面 笔者 也会专注于 服务端 ssr 的研究~

    欢迎推荐噢~

  • 相关阅读:
    python中的递归算法
    python中的闭包函数
    python中的函数对象和函数嵌套
    python中函数与参数的简介
    python中的文件操作: 包括文件的打开方式和文件的修改
    python中元组;字典;集合的内置方法以及它们的取值方式
    python中的数字类型及内置方式;字符类型及内置方式和列表类型及内置方法
    python中的while和for循环以及break,continue结束语句。
    判断字符串以字母开头,后面可以是数字,下划线,字母,长度为6-30
    Prompt box是什么?它的返回值有什么用?
  • 原文地址:https://www.cnblogs.com/erbingbing/p/7362198.html
Copyright © 2011-2022 走看看