<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Repository on Janik von Rotz</title>
    <link>https://janikvonrotz.ch/tags/repository/</link>
    <description>Recent content in Repository on Janik von Rotz</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Thu, 27 Mar 2014 16:46:14 +0000</lastBuildDate>
    <atom:link href="https://janikvonrotz.ch/tags/repository/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Install Node</title>
      <link>https://janikvonrotz.ch/2014/03/27/install-node/</link>
      <pubDate>Thu, 27 Mar 2014 16:46:14 +0000</pubDate>
      <guid>https://janikvonrotz.ch/2014/03/27/install-node/</guid>
      <description>&lt;p&gt;&lt;em&gt;This post is part of my &lt;a href=&#34;https://janikvonrotz.ch/your-own-virtual-private-server-hosting-solution/&#34;&gt;Your own Virtual Private Server hosting solution&lt;/a&gt; project.&lt;/em&gt;&lt;br&gt;&#xA;&lt;em&gt;Get the latest version of this article here: &lt;a href=&#34;https://gist.github.com/9346588&#34;&gt;https://gist.github.com/9346588&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;h1 id=&#34;introduction&#34;&gt;Introduction&lt;/h1&gt;&#xA;&lt;p&gt;Node.js is a cross-platform runtime environment for server-side and networking applications.&lt;/p&gt;&#xA;&lt;h1 id=&#34;requirements&#34;&gt;Requirements&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://janikvonrotz.ch/2014/03/13/deploy-ubuntu-server/&#34;&gt;Ubuntu server&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://janikvonrotz.ch/2014/03/25/install-ubuntu-development-libraries/&#34;&gt;build-essential&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://janikvonrotz.ch/2014/03/25/install-ubuntu-packages/&#34;&gt;Git&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1 id=&#34;installation&#34;&gt;Installation&lt;/h1&gt;&#xA;&lt;p&gt;You can install Node.js either from website or the from the git repo.&lt;/p&gt;&#xA;&lt;h2 id=&#34;install-from-source&#34;&gt;Install from source&lt;/h2&gt;&#xA;&lt;p&gt;Download Node.js with wget.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;cd /usr/local/src&#xA;sudo wget http://nodejs.org/dist/node-latest.tar.gz&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Unpack Node.js.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo tar -xzf node-latest.tar.gz&#xA;cd node-&amp;lt;version&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Install Node.js.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo ./configure&#xA;sudo make&#xA;sudo make install&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Check version of Node.js and npm.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;node -v&#xA;npm -v&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;install-with-git&#34;&gt;Install with Git&lt;/h2&gt;&#xA;&lt;p&gt;Clone the Node.js repo.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;cd /usr/local/src&#xA;sudo git clone git://github.com/joyent/node.git&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Or use the https url if ssh is not possible.&lt;/p&gt;&#xA;&lt;p&gt;sudo git &lt;a href=&#34;https://github.com/joyent/node.git&#34;&gt;https://github.com/joyent/node.git&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Check git tags to find the latest version.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;cd node&#xA;git tag&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;See the latest stable version on &lt;a href=&#34;http://nodejs.org/&#34;&gt;http://nodejs.org/&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Checkout the latest version.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo git checkout vX.X.X&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Install Node.js.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo ./configure&#xA;sudo make&#xA;sudo make install&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Check version of Node.js and npm.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;node -v&#xA;npm -v&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h1 id=&#34;update&#34;&gt;Update&lt;/h1&gt;&#xA;&lt;p&gt;Depending on how you&amp;rsquo;ve installed Node.js theres an update strategy.&lt;/p&gt;&#xA;&lt;h2 id=&#34;from-source&#34;&gt;from source&lt;/h2&gt;&#xA;&lt;p&gt;Repeat the installation process above.&lt;/p&gt;&#xA;&lt;h2 id=&#34;with-git&#34;&gt;with Git&lt;/h2&gt;&#xA;&lt;p&gt;Pull down the latest source code.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;cd /usr/local/src/node&#xA;sudo git checkout master&#xA;sudo git pull origin master&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Check git tags to find the latest version.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;git tag&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;See the latest stable version on &lt;a href=&#34;http://nodejs.org/&#34;&gt;http://nodejs.org/&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Compile the latest version.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo git checkout vx.x.x&#xA;sudo ./configure&#xA;sudo make&#xA;sudo make install&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
  </channel>
</rss>
