【问题标题】:How to install node.js & angular.js on a google instance如何在谷歌实例上安装 node.js 和 angular.js
【发布时间】:2018-09-01 04:21:46
【问题描述】:

如何在运行 CentOS7 的谷歌实例上安装 node.js 和 angular.js

我找不到有效的说明。实例未安装 GUI

问候

【问题讨论】:

    标签: angularjs node.js server installation


    【解决方案1】:

    第 0 步 – 安装先决条件 Node.js 从需要 EPEL 存储库的 NodeSource 存储库安装。

    sudo yum -y install epel-release
    

    由于我们将使用 npm 来安装 Angular CLI,它需要很少的构建工具来编译和安装包。

    sudo yum -y install gcc c++ make.
    

    第 1 步 – 安装 Node.js 选项 1:使用 yum 安装 Node.js。

    sudo yum -y install nodejs
    

    选项 2:安装最新的 Node.js

    第 2 步 - 安装 Angular

    npm install -g @angular/cli
    

    开始一个 Angular 项目

    ng new <project-name>
    

    盯着开发服务器

    cd <project-name>
    ng serve
    

    更多信息请通过链接: [http://devopspy.com/wp-content/uploads/2017/12/node-4.png][1]

    【讨论】:

    • 太好了。谢谢。安装过 XFC 和 VNC 吗?在 CentOS 7 服务器中?
    【解决方案2】:

    您可以访问 CentOS 终端并下载依赖项,例如在新安装的 Ubuntu 中,我们使用 apt-get install npmapt-get install node 安装 npm 和 node,然后使用 npm 我们可以安装更多软件包。

    为此使用终端,如果这对您有帮助,请检查此How To Install Node.js on a CentOS 7 server

    npm install 完成后,您可以安装 angularJS 或任何其他 npm 包。

    希望对你有帮助

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-04-26
      • 1970-01-01
      • 2017-11-09
      • 2021-03-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-04-17
      相关资源
      最近更新 更多