| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
吴青强
8年前发布

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

   <p>运行 <a href="/misc/goto?guid=4959637868967901487">Ghost</a> 必须要安装 <a href="/misc/goto?guid=4958867323246690255">Node.js</a>。但是 Ubuntu 或 Debian 的软件仓库中的 Node.js 更新较慢,甚至只能等到新版本发布才能有最新的 Node.js 用。下面我们说一下从 <a href="/misc/goto?guid=4959670726873150307">NodeSource</a> 提供的仓库中安装最新版本的 Node.js。</p>    <h2>支持的操作系统版本</h2>    <p>被支持的 Ubuntu 版本:</p>    <ul>     <li>Ubuntu 12.04 LTS (Precise Pangolin)</li>     <li>Ubuntu 14.04 LTS (Trusty Tahr)</li>     <li>Ubuntu 15.04 (Vivid Vervet)</li>     <li>Ubuntu 15.10 (Wily Werewolf) [For Node >= 4.2.x]</li>    </ul>    <p>被支持的 Debian 版本:</p>    <ul>     <li>Debian 7 (wheezy)</li>     <li>Debian 8 / stable (jessie)</li>     <li>Debian testing (stretch, aliased to jessie)</li>     <li>Debian unstable (sid)</li>    </ul>    <h2>安装步骤</h2>    <p>Ghost 目前支持 <code>0.10.*</code>、<code>0.12.*</code> 和 <code>>=4.2 <5.* (LTS)</code> 版本的 Node.js,推荐的是 <code>>0.10.40 (最新版本)</code>。详细说明请看这里:<a href="/misc/goto?guid=4959670726961032113">http://support.ghost.org/supported-node-versions/</a></p>    <p><strong>根据我们的安装经验,推荐安装 4.x(LTS)版本的 Node.js。</strong></p>    <h3>安装 Node.js v4.x</h3>    <p><strong>Ubuntu 系统</strong></p>    <pre>  <code class="language-bash">curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -    sudo apt-get install -y nodejs    </code></pre>    <p><strong>Debian 系统。以 root 权限执行下列指令</strong></p>    <pre>  <code class="language-bash">curl -sL https://deb.nodesource.com/setup_4.x | bash -    apt-get install -y nodejs    </code></pre>    <h3>安装 Node.js v0.10</h3>    <p><strong>Ubuntu 系统</strong></p>    <pre>  <code class="language-bash">curl -sL https://deb.nodesource.com/setup_0.10 | sudo -E bash -    sudo apt-get install -y nodejs    </code></pre>    <p><strong>Debian 系统。以 root 权限执行下列指令</strong></p>    <pre>  <code class="language-bash">curl -sL https://deb.nodesource.com/setup_0.10 | bash -    apt-get install -y nodejs    </code></pre>    <h3>安装 Node.js v0.12</h3>    <p><strong>Ubuntu 系统</strong></p>    <pre>  <code class="language-bash">curl -sL https://deb.nodesource.com/setup_0.12 | sudo -E bash -    sudo apt-get install -y nodejs    </code></pre>    <p><strong>Debian 系统。以 root 权限执行下列指令</strong></p>    <pre>  <code class="language-bash">curl -sL https://deb.nodesource.com/setup_0.12 | bash -    apt-get install -y nodejs    </code></pre>    <h3>安装 Node.js v5.x</h3>    <p><strong>注意:v5.x 的 Node.js 不被 Ghost 支持,以下安装介绍只为了完整介绍 Node.js 各个版本的安装!</strong></p>    <p><strong>Ubuntu 系统</strong></p>    <pre>  <code class="language-bash">curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -    sudo apt-get install -y nodejs    </code></pre>    <p><strong>Debian 系统。以 root 权限执行下列指令</strong></p>    <pre>  <code class="language-bash">curl -sL https://deb.nodesource.com/setup_5.x | bash -    apt-get install -y nodejs    </code></pre>    <p> </p>    <p>来自:http://www.ghostchina.com/install-nodejs-of-latest-version-in-ubuntu-and-debian/</p>    
 本文由用户 吴青强 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
 转载本站原创文章,请注明出处,并保留原始链接、图片水印。
 本站是一个以用户分享为主的开源技术平台,欢迎各类分享!
 本文地址:https://www.open-open.com/lib/view/open1460625115869.html
Node.js Node.js扩展