Ubuntu 和 Debian 安装最新版本的 Node.js

支持的操作系统版本

被支持的 Ubuntu 版本:

  • Ubuntu 12.04 LTS (Precise Pangolin)
  • Ubuntu 14.04 LTS (Trusty Tahr)
  • Ubuntu 15.04 (Vivid Vervet)
  • Ubuntu 15.10 (Wily Werewolf) [For Node >= 4.2.x]

被支持的 Debian 版本:

  • Debian 7 (wheezy)
  • Debian 8 / stable (jessie)
  • Debian testing (stretch, aliased to jessie)
  • Debian unstable (sid)

安装步骤

Ghost 目前支持 0.10.*0.12.*>=4.2 <5.* (LTS) 版本的 Node.js,推荐的是 >0.10.40 (最新版本)。详细说明请看这里:http://support.ghost.org/supported-node-versions/

根据我们的安装经验,推荐安装 4.x(LTS)版本的 Node.js。

安装 Node.js v4.x

Ubuntu 系统

curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -  
sudo apt-get install -y nodejs  

Debian 系统。以 root 权限执行下列指令

curl -sL https://deb.nodesource.com/setup_4.x | bash -  
apt-get install -y nodejs  

安装 Node.js v0.10

Ubuntu 系统

curl -sL https://deb.nodesource.com/setup_0.10 | sudo -E bash -  
sudo apt-get install -y nodejs  

Debian 系统。以 root 权限执行下列指令

curl -sL https://deb.nodesource.com/setup_0.10 | bash -  
apt-get install -y nodejs  

安装 Node.js v0.12

Ubuntu 系统

curl -sL https://deb.nodesource.com/setup_0.12 | sudo -E bash -  
sudo apt-get install -y nodejs  

Debian 系统。以 root 权限执行下列指令

curl -sL https://deb.nodesource.com/setup_0.12 | bash -  
apt-get install -y nodejs  

安装 Node.js v5.x

注意:v5.x 的 Node.js 不被 Ghost 支持,以下安装介绍只为了完整介绍 Node.js 各个版本的安装!

Ubuntu 系统

curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -  
sudo apt-get install -y nodejs  

Debian 系统。以 root 权限执行下列指令

curl -sL https://deb.nodesource.com/setup_5.x | bash -  
apt-get install -y nodejs  

下面关于Node.js的内容你可能也喜欢

Node.js 的详细介绍请点这里
Node.js 的下载地址请点这里

猜你喜欢

转载自www.linuxidc.com/Linux/2016-11/137338.htm