1. 程式人生 > >linux-- node服務器搭建

linux-- node服務器搭建

.com 解壓 yun click arch 通過 命令 tps org

安裝配置nginx

原文連接

安裝nodejs

1. 下載node最新版本 : 連接 https://nodejs.org/download/release/

 wget https://nodejs.org/download/release/v9.9.0/node-v9.9.0-linux-x64.tar.xz

2. 解壓

  tar -xf node-v9.9.0-linux-x64.tar.xz

3. cd到bin目錄 執行下面命令 【使用包裏面的node運行npm模塊安裝n工具】

  ./node npm install -g n

4. 再通過n工具安裝系統環境的node

  ./n latest

5.安裝系統環境的n工具(先前是在壓縮包裏面的)

  npm install -g n

6. 安裝node最新版本

  n latest

7. 安裝node標準版本:

  n stable

8. 完

-------------------------------------------

linux-- node服務器搭建