美文网首页
Ubuntu 安装 Node、Pm2

Ubuntu 安装 Node、Pm2

作者: shmaur | 来源:发表于2019-12-29 23:47 被阅读0次

    Node 安装

      我的Node应用版本在10版本上。Ubuntu 18.04 默认的就是8.x。所以需要更新一下

    wget -qO- https://deb.nodesource.com/setup_10.x | sudo -E bash -
    

      更新好了后,安装

    sudo apt-get install nodejs
    

      安装过程比较顺利,没有Ubuntu 16.04版本出现缺少系统插件的问题。

      如果需要镜像就安装即可:

    npm install -g cnpm --registry=https://registry.npm.taobao.org
    

    PM2 安装

    npm i pm2 -g
    

      查看是否成功:

    pm2 --help
    

    相关文章

      网友评论

          本文标题:Ubuntu 安装 Node、Pm2

          本文链接:https://www.haomeiwen.com/subject/wpnuoctx.html