完整的安装说明已上载 这里 通过Nodesource。 它复制在下面供您参考。 更新到最新版本的说明相同。
如果你不喜欢 curl ... | sudo bash -
然后你可以按照 手册说明,它告诉你如何添加节点。js仓库到 /etc/apt/sources.list.d/
你自己。
注意:如果您使用的是Ubuntu精确或Debian Wheezy,您可能需要阅读 运行节点。js>=6.旧发行版上的x
节点。js当前:
# Using Ubuntucurl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -sudo apt-get install -y nodejs# Using Debian, as rootcurl -fsSL https://deb.nodesource.com/setup_current.x | bash -apt-get install -y nodejs
节点。js v13.x:
# Using Ubuntucurl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -sudo apt-get install -y nodejs# Using Debian, as rootcurl -sL https://deb.nodesource.com/setup_13.x | bash -apt-get install -y nodejs
节点。js v12.x:
# Using Ubuntucurl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -sudo apt-get install -y nodejs# Using Debian, as rootcurl -sL https://deb.nodesource.com/setup_12.x | bash -apt-get install -y nodejs
节点。js v11.x:
# Using Ubuntucurl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -sudo apt-get install -y nodejs# Using Debian, as rootcurl -sL https://deb.nodesource.com/setup_11.x | bash -apt-get install -y nodejs
节点。js v10.x:
# Using Ubuntucurl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -sudo apt-get install -y nodejs# Using Debian, as rootcurl -sL https://deb.nodesource.com/setup_10.x | bash -apt-get install -y nodejs
节点。js v9.x:
# Using Ubuntucurl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -sudo apt-get install -y nodejs# Using Debian, as rootcurl -sL https://deb.nodesource.com/setup_9.x | bash -apt-get install -y nodejs
节点。js v8.x:
# Using Ubuntucurl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -sudo apt-get install -y nodejs# Using Debian, as rootcurl -sL https://deb.nodesource.com/setup_8.x | bash -apt-get install -y nodejs
节点。js v7.x:
注意:Debian Wheezy和Ubuntu精确软件包是 不是 可用于此版本。 请参考 运行节点。js>=4.旧发行版上的x
# Using Ubuntucurl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -sudo apt-get install -y nodejs# Using Debian, as rootcurl -sL https://deb.nodesource.com/setup_7.x | bash -apt-get install -y nodejs
节点。js v6.x:
注意:如果您使用的是Ubuntu精确或Debian Wheezy,您可能需要阅读 运行节点。js>=4.旧发行版上的x.
# Using Ubuntucurl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -sudo apt-get install -y nodejs# Using Debian, as rootcurl -sL https://deb.nodesource.com/setup_6.x | bash -apt-get install -y nodejs
节点。js v5.x:
注意:如果您使用的是Ubuntu精确或Debian Wheezy,您可能需要阅读 运行节点。js>=4.旧发行版上的x.
# Using Ubuntucurl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -sudo apt-get install -y nodejs# Using Debian, as rootcurl -sL https://deb.nodesource.com/setup_5.x | bash -apt-get install -y nodejs
节点。js v4.x:
注意:如果您使用的是Ubuntu精确或Debian Wheezy,您可能需要阅读 运行节点。js>=4.旧发行版上的x.
# Using Ubuntucurl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -sudo apt-get install -y nodejs# Using Debian, as rootcurl -sL https://deb.nodesource.com/setup_4.x | bash -apt-get install -y nodejs
节点。js v0.12:
# Using Ubuntucurl -sL https://deb.nodesource.com/setup_0.12 | sudo -E bash -sudo apt-get install -y nodejs# Using Debian, as rootcurl -sL https://deb.nodesource.com/setup_0.12 | bash -apt-get install -y nodejs
节点。js v0.10:
# Using Ubuntucurl -sL https://deb.nodesource.com/setup_0.10 | sudo -E bash -sudo apt-get install -y nodejs# Using Debian, as rootcurl -sL https://deb.nodesource.com/setup_0.10 | bash -apt-get install -y nodejs
伊俄js v3.x:
# Using Ubuntucurl -sL https://deb.nodesource.com/setup_iojs_3.x | sudo -E bash -sudo apt-get install -y iojs# Using Debian, as rootcurl -sL https://deb.nodesource.com/setup_iojs_3.x | bash -apt-get install -y iojs
伊俄js v2.x:
# Using Ubuntucurl -sL https://deb.nodesource.com/setup_iojs_2.x | sudo -E bash -sudo apt-get install -y iojs# Using Debian, as rootcurl -sL https://deb.nodesource.com/setup_iojs_2.x | bash -apt-get install -y iojs
伊俄js v1.x:
注意:io的这个分支。js没有积极维护,不建议用于生产使用。
# Using Ubuntucurl -sL https://deb.nodesource.com/setup_iojs_1.x | sudo -E bash -sudo apt-get install -y iojs# Using Debian, as rootcurl -sL https://deb.nodesource.com/setup_iojs_1.x | bash -apt-get install -y iojs