<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>nvm — Simple Engineering</title>
    <link>https://getsimple.works/tag:nvm</link>
    <description></description>
    <pubDate>Sun, 15 Nov 2026 00:39:40 +0000</pubDate>
    <item>
      <title>How to install redis</title>
      <link>https://getsimple.works/how-to-install-redis?pk_campaign=rss-feed</link>
      <description>This article revisits essentials on how to install redis key/value data store on development and production servers. This article has com...</description>
      <content:encoded><![CDATA[<p>This article revisits essentials on how to install <code>redis</code> key/value data store on development and production servers.</p>

<blockquote><p>This article has complementary materials to the <strong><em><a href="http://bit.ly/2ZFJytb">Testing <code>nodejs</code> Applications book</a></em></strong>. However, the article is designed to help both those who already bought the book, as well as the wide audience of software developers  to setup working environment.  <a href="http://bit.ly/2ZFJytb"><img src="https://snap.as/a/42OS2vs.png" alt="Testing Nodejs Applications Book Cover"/></a>
<strong><em><a href="http://bit.ly/2ZFJytb">You can grab a copy of this book on this link</a></em></strong></p></blockquote>

<h2 id="installing-redis-on-linux">Installing <code>redis</code> on Linux</h2>

<p>It is always a good idea to update the system before start working. There is no exception, even when a daily task updates automatically binaries. That can be achieved on Ubuntu and Aptitude enabled systems as following:</p>

<pre><code class="language-shell">$ apt-get update # Fetch list of available updates
$ apt-get upgrade # Upgrades current packages
$ apt-get dist-upgrade # Installs only new updates
</code></pre>

<p><em><em>Example</em>: updating aptitude binaries</em></p>

<p>At this point most of packages should be installed or upgraded. Except Packages whose PPA have been removed or not available in the registry. Installing software can be done by installing binaries, or using Ubuntu package manager.</p>

<h3 id="installing-a-redis-on-linux-using-apt">Installing a <code>redis</code> on Linux using <code>apt</code></h3>

<p>Updating <code>redis</code> – In case the above global update didn&#39;t take effect.
  The <code>-y</code> option passes YES, so there are no prompt for <code>Y/N?</code> while installing libraries.</p>

<pre><code class="language-shell"># Installing binaries 
$ curl -O http://download.redis.io/redis-stable.tar.gz
$ tar xzvf redis-stable.tar.gz &amp;&amp; cd redis-stable 
$ make &amp;&amp; make install
# Configure redis - for first time installs 

# Install via PPA 
$ apt-get install -y python-software-properties #provides access to add-apt-repository 
$ apt-get install -y software-properties-common python-software-properties

# @link https://packages.ubuntu.com/bionic/redis 
$ add-apt-repository -y ppa:bionic/redis # Alternatively rwky/redis
$ apt-get update
$ apt-get install -y redis-server

# Starting Redis for development on Mac
$ redis-server /usr/local/etc/redis.conf 
</code></pre>

<p><em><em>Example</em>: installing <code>redis</code> binaries with aptitude</em></p>

<h2 id="installing-redis-on-a-mac-system">Installing <code>redis</code> on a Mac system</h2>

<p>In case <code>homebrew</code> is not already available on your mac, this is how to get one up and running. On its own, <code>homebrew</code> depends on ruby runtime to be available.</p>

<blockquote><p><code>homebrew</code> is a package manager and software installation tool that makes most developer tools installation a breeze.</p></blockquote>

<pre><code class="language-shell">$ /usr/bin/ruby -e &#34;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)&#34;
</code></pre>

<p><em><em>Example:</em> installation instruction as provided by <a href="https://brew.sh/">brew.sh</a></em></p>

<p>Generally speaking, this is how to install/uninstall things with <code>brew</code></p>

<pre><code class="language-shell">$ brew install wget 
$ brew uninstall wget 
</code></pre>

<p><em><em>Example</em>: installing/uninstalling <code>wget</code> binaries using homebrew</em></p>

<blockquote><p>We have to to stress on the fact that <a href="https://brew.sh/">Homebrew</a> installs packages to their own directory and then symlinks their files into <code>/usr/local</code>.</p></blockquote>

<p>It is always a good idea to update the system before start working. And that, even when we have a daily task that automatically updates the system for us. macOS  can use <code>homebrew</code> package manager on maintenance matters. To update/upgrade or check outdated packages, following commands would help.</p>

<pre><code class="language-shell">$ brew outdated                   # lists all outdated packages
$ brew cleanup -n                 # visualize the list of things are going to be cleaned up.

$ brew upgrade                    # Upgrades all things on the system
$ brew update                     # Updates all outdated + brew itself
$ brew update &lt;formula&gt;           # Updates one formula

$ brew install &lt;formula@version&gt;    # Installs &lt;formula&gt; at a particular version.
$ brew tap &lt;formular@version&gt;/brew  # Installs &lt;formular&gt; from third party repository

# untap/re-tap a repo when previous installation failed
$ brew untap &lt;formular&gt; &amp;&amp; brew tap &lt;formula&gt;   
$ brew services start &lt;formular&gt;@&lt;version&gt;
</code></pre>

<p><em><em>Example</em>: key commands to work with <code>homebrew</code> cli</em></p>

<blockquote><p>For more informations, visit: <a href="https://docs.brew.sh/FAQ">Homebrew ~ FAQ</a>.</p></blockquote>

<h3 id="installing-a-redis-on-a-macos-using-curl">Installing a <code>redis</code> on a macOS  using <code>curl</code></h3>

<p>Installing <code>redis</code> via a <code>curl</code> command is not that different as on Linux system. The following instructions can accomplish the installation.</p>

<pre><code class="language-shell"># Installing binaries 
$ curl -O http://download.redis.io/redis-stable.tar.gz
$ tar xzvf redis-stable.tar.gz &amp;&amp; cd redis-stable 
$ make &amp;&amp; make install
# Configure redis - for first time installs 
</code></pre>

<p><em><em>Example</em>: install <code>redis</code> binaries using <code>curl</code> and <code>make</code></em></p>

<h3 id="installing-a-redis-on-a-mac-using-homebrew">Installing a <code>redis</code> on a Mac using <code>homebrew</code></h3>

<pre><code class="language-shell">$ brew install redis        # Installation following &lt;formula&gt;@&lt;version&gt; template 
$ brew services start redis # Starting redis as a service  

# Alternatively start as usual 
$ redis-server /usr/local/etc/redis.conf
# Running on port: 6379
</code></pre>

<p><em><em>Example</em>: install <code>redis</code> binaries using <code>homebrew</code></em></p>

<h2 id="installing-redis-on-a-windows-machine">Installing <code>redis</code> on a Windows machine</h2>

<p>MacOs comes with Python and Ruby already enabled, these two languages are somehow required to run successfully a <code>nodejs</code> environment. This is an easy target as <a href="https://redis.io/download"><code>redis</code></a> gives windows binaries that we can download and install on a couple of clicks.</p>

<h2 id="automated-upgrades">Automated upgrades</h2>

<p>Before we dive into automatic upgrades, we should consider nuances associated to managing a <code>mongodb</code> instance. The updates fall into two major, quite interesting, categories: <strong><em>patch</em></strong> updates and <strong><em>version upgrades</em></strong>.</p>

<p>Following the <a href="https://semver.org/">SemVer ~ <em>aka Semantic Versioning</em></a> standard, it is recommended that the only pair <strong><em>minor</em></strong> versions be considered for version upgrades. This is because minor versions, as well as major versions, are subject to introducing breaking changes or incompatibility between two versions.  On the other hand, patches do not introduce breaking changes. Those can therefore be automated.</p>

<blockquote><p>We should highlight that it is always better to upgrade at deployment time. The process is even easier in containerized context. We should also automate only patches, to avoid to miss security patches.</p></blockquote>

<p>In the context of Linux, we will use the <strong><em>unattended-upgrades</em></strong> package to do the work.</p>

<pre><code class="language-shell">$ apt-get install unattended-upgrades apticron
</code></pre>

<p><em><em>Example</em>: install unattended-upgrades</em></p>

<p>Two things to fine-tune to make this solution work are: to enable a blacklist of packages we do not to automatically update, and two, to enable particular packages we would love to update on a periodical basis. That is compiled in the following shell scripts.</p>

<pre><code class="language-shell">Unattended-Upgrade::Allowed-Origins {
//  &#34;${distro_id}:${distro_codename}&#34;;
    &#34;${distro_id}:${distro_codename}-security&#34;; # upgrading security patches only 
//   &#34;${distro_id}:${distro_codename}-updates&#34;;  
//  &#34;${distro_id}:${distro_codename}-proposed&#34;;
//  &#34;${distro_id}:${distro_codename}-backports&#34;;
};

Unattended-Upgrade::Package-Blacklist {
    &#34;vim&#34;;
};
</code></pre>

<p><em><em>Example</em>: fine-tune the blacklist and whitelist in <code>/etc/apt/apt.conf.d/50unattended-upgrades</code></em></p>

<p>The next step is necessary to make sure  <strong><em>unattended-upgrades</em></strong> download, install and cleanups tasks have a default period: once, twice a day or a week.</p>

<pre><code class="language-shell">APT::Periodic::Update-Package-Lists &#34;1&#34;;            # Updates package list once a day
APT::Periodic::Download-Upgradeable-Packages &#34;1&#34;;   # download upgrade candidates once a day
APT::Periodic::AutocleanInterval &#34;7&#34;;               # clean week worth of unused packages once a week
APT::Periodic::Unattended-Upgrade &#34;1&#34;;              # install downloaded packages once a day
</code></pre>

<p><em><em>Example</em>: tuning the tasks parameter <code>/etc/apt/apt.conf.d/20auto-upgrades</code></em></p>

<p>This approach works on Linux(Ubuntu), especially deployed in production, but not Windows nor macOS. The last issue, is to be able to report problems when an update fails, so that a human can intervene whenever possible. That is where the second tool <code>apticron</code> in first paragraph intervenes. To make it work, we will specify which email to send messages to, and that will be all.</p>

<pre><code class="language-shell">EMAIL=&#34;&lt;email&gt;@&lt;host.tld&gt;&#34;
</code></pre>

<p><em><em>Example</em>: tuning reporting tasks email parameter <code>/etc/apticron/apticron.conf</code></em></p>

<h2 id="conclusion">Conclusion</h2>

<p>In this article we revisited ways to install <code>redis</code> on various platforms. Even though <strong><em><a href="https://getsimple.works/how-to-configure-nodejs-applications#configure-redis-to-run-with-a-nodejs-server">configuration was beyond the scope of this article</a></em></strong>, we managed to get everyday quick refreshers out.</p>

<h2 id="reading-list">Reading list</h2>
<ul><li><a href="https://medium.com/@petehouston/install-and-config-redis-on-mac-os-x-via-homebrew-eb8df9a4f298">Install and config Redis on Mac OS X via Homebrew</a></li>
<li><a href="https://getsimple.works/how-to-configure-nodejs-applications">Configuring <code>nodejs</code> applications</a></li></ul>

<p><a href="https://getsimple.works/tag:nodejs" class="hashtag"><span>#</span><span class="p-category">nodejs</span></a> <a href="https://getsimple.works/tag:homebrew" class="hashtag"><span>#</span><span class="p-category">homebrew</span></a> <a href="https://getsimple.works/tag:UnattendedUpgrades" class="hashtag"><span>#</span><span class="p-category">UnattendedUpgrades</span></a> <a href="https://getsimple.works/tag:nvm" class="hashtag"><span>#</span><span class="p-category">nvm</span></a> <a href="https://getsimple.works/tag:n" class="hashtag"><span>#</span><span class="p-category">n</span></a> <a href="https://getsimple.works/tag:y2020" class="hashtag"><span>#</span><span class="p-category">y2020</span></a> <a href="https://getsimple.works/tag:Jan2020" class="hashtag"><span>#</span><span class="p-category">Jan2020</span></a> <a href="https://getsimple.works/tag:HowTo" class="hashtag"><span>#</span><span class="p-category">HowTo</span></a> <a href="https://getsimple.works/tag:ConfiguringNodejsApplications" class="hashtag"><span>#</span><span class="p-category">ConfiguringNodejsApplications</span></a> <a href="https://getsimple.works/tag:tdd" class="hashtag"><span>#</span><span class="p-category">tdd</span></a> <a href="https://getsimple.works/tag:TestingNodejsApplications" class="hashtag"><span>#</span><span class="p-category">TestingNodejsApplications</span></a></p>
]]></content:encoded>
      <guid>https://getsimple.works/how-to-install-redis</guid>
      <pubDate>Fri, 31 Jan 2020 22:45:40 +0000</pubDate>
    </item>
    <item>
      <title>How to install nodejs</title>
      <link>https://getsimple.works/how-to-install-nodejs?pk_campaign=rss-feed</link>
      <description>This article revisits essentials on how to install a nodejs environment, on both development and production servers. This article has com...</description>
      <content:encoded><![CDATA[<p>This article revisits essentials on how to install a <code>nodejs</code> environment, on both development and production servers.</p>

<blockquote><p>This article has complementary materials to the <strong><em><a href="http://bit.ly/2ZFJytb">Testing <code>nodejs</code> Applications book</a></em></strong>. However, the article is designed to help both those who already bought the book, as well as the wide audience of software developers  to setup working environment.  <a href="http://bit.ly/2ZFJytb"><img src="https://snap.as/a/42OS2vs.png" alt="Testing Nodejs Applications Book Cover"/></a>
<strong><em><a href="http://bit.ly/2ZFJytb">You can grab a copy of this book on this link</a></em></strong></p></blockquote>

<h2 id="installing-nodejs-on-linux">Installing <code>nodejs</code> on Linux</h2>

<p>When running aptitude, or similar package management tools, installing <code>nodejs</code> becomes quite like installing any other program. The following commands are the ones most people tend to use.</p>

<h3 id="installing-a-nodejs-on-linux-using-apt">Installing a <code>nodejs</code> on Linux using <code>apt</code></h3>

<p>Challenge using this strategy, is to make sure we have <code>nodejs</code> in our PPA database.</p>

<pre><code class="language-shell"># Adding and using nodejs from individual PPAs 
$ sudo add-apt-repository ppa:chris-lea/nodejs
$ sudo apt-get update
$ sudo apt-get install -y nodejs


# Removing Chriss Lea PPA before using NodeSource PPA 
# @link https://github.com/nodesource/distributions#manual-installation
$ sudo add-apt-repository -y -r ppa:chris-lea/nodejs
$ sudo rm -f /etc/apt/sources.list.d/chris-lea-node_js-*.list
$ sudo rm -f /etc/apt/sources.list.d/chris-lea-node_js-*.list.save


# Adding and using NodeSource distribution 
# @link https://github.com/nodesource/distributions 
$ curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
# Alternatively 
$ curl -sL https://deb.nodesource.com/setup | sudo bash -
$ sudo apt-get install -y nodejs
</code></pre>

<p><em><em>Example</em>: install <code>nodejs</code> binaries aptitude</em></p>

<p>Once we have <code>nodejs</code> to be recognized by aptitude, most operations becomes a little more familiar. Normally running <code>apt-get upgrade</code> should upgrade all binaries including <code>nodejs</code>. We should mention that updating <code>nodejs</code> also updates <code>npm</code>.</p>

<h3 id="installing-a-nodejs-on-linux-using-nvm">Installing a <code>nodejs</code> on Linux using <code>nvm</code></h3>

<p>When we want to test an application against a particular version of <code>nodejs</code>, the environment we work in should be able to manage multiple versions of <code>nodejs</code>. That is where tools such as nvm come into play.</p>

<p>To make the tool work, we will have to have <code>nodejs</code> installed on our work environment. The second step will be to download and install <code>nvm</code> to our work environment. After installation, we can use tools provided by the nvm to install and toggle a specific version.</p>

<pre><code class="language-shell">$ curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
# Or 
$ wget https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
# Install a particular nodejs version
$ nvm install v&lt;Major&gt;.&lt;Minor&gt;.&lt;Patch&gt;
# toggle a particular nodejs version
$ nvm use  v&lt;Major&gt;.&lt;Minor&gt;.&lt;Patch&gt;
# execture code with a particular nodejs version 
$ nvm run  v&lt;Major&gt;.&lt;Minor&gt;.&lt;Patch&gt; /path/to/server.js
# uninstall a particular nodejs version
$ nvm uninstall  v&lt;Major&gt;.&lt;Minor&gt;.&lt;Patch&gt;
</code></pre>

<p><em><em>Example:</em> working with <a href="https://github.com/nvm-sh/nvm"><code>nvm</code></a> tool</em></p>

<p>An approach a bit similar to this is available for yet another <code>nodejs</code> version manager known under pseudonym <a href="https://www.npmjs.com/package/n"><code>n</code></a></p>

<h2 id="installing-nodejs-on-macos">Installing <code>nodejs</code> on macOS</h2>

<p>It is possible to download and install <code>nodejs</code> manually, with ready to use installer. However, when wanting to tuning <code>nodejs</code> environment at our taste, messing with methods and other tools described below becomes a must.</p>

<p>In case <code>homebrew</code> is not already available on your mac, this is how to get one up and running. On its own, <code>homebrew</code> depends on <code>ruby</code> runtime to be available.</p>

<blockquote><p><code>homebrew</code> is a package manager and software installation tool that makes most developer tools installation on macOS a breeze. We should also highlight that <code>homebrew</code> requires <code>xcode</code> to be available on the system.</p></blockquote>

<pre><code class="language-shell">$ /usr/bin/ruby -e \
    &#34;$(curl -fsSL https://raw.githubusercontent.com \
    /Homebrew/install/master/install)&#34;
</code></pre>

<p><em><em>Example:</em> installation instruction as provided by <a href="https://brew.sh/">brew.sh</a></em></p>

<p>Generally speaking, this is how to <strong><em>install</em></strong> and <strong><em>uninstall</em></strong> things with <code>brew</code></p>

<pre><code class="language-shell">$ brew install wget 
$ brew uninstall wget 
</code></pre>

<p><em><em>Example</em>: installing/uninstalling <code>wget</code> binaries using homebrew</em></p>

<blockquote><p>We have to to stress on the fact that <a href="https://brew.sh/">Homebrew</a> installs packages to their own directory and then symlinks their files into <code>/usr/local</code>.</p></blockquote>

<p>It is always a good idea to update the system before start working. And that, even when we have a daily task that automatically updates the system for us. macOS  can use <code>homebrew</code> package manager on maintenance matters. To update/upgrade or check outdated packages, following commands would help.</p>

<pre><code class="language-shell">$ brew outdated                   # lists all outdated packages
$ brew cleanup -n                 # visualize the list of things are going to be cleaned up.

$ brew upgrade                    # Upgrades all things on the system
$ brew update                     # Updates all outdated + brew itself
$ brew update &lt;formula&gt;           # Updates one formula

$ brew install &lt;formula@version&gt;    # Installs &lt;formula&gt; at a particular version.
$ brew tap &lt;formular@version&gt;/brew  # Installs &lt;formular&gt; from third party repository

# untap/re-tap a repo when previous installation failed
$ brew untap &lt;formular&gt; &amp;&amp; brew tap &lt;formula&gt;   
$ brew services start &lt;formular&gt;@&lt;version&gt;
</code></pre>

<p><em><em>Example</em>: key commands to work with <code>homebrew</code> cli</em></p>

<blockquote><p>For more informations, visit: <a href="https://docs.brew.sh/FAQ">Homebrew ~ FAQ</a>.</p></blockquote>

<h3 id="installing-a-nodejs-on-a-macos-using-curl">Installing a <code>nodejs</code> on a macOS  using <code>curl</code></h3>

<p><code>nodejs</code> installation guide suggests this alternative for the MacOs. However, we have to customize a download directory, the version, and installation directory.</p>

<pre><code class="language-shell">$ curl &#34;https://nodejs.org/dist/latest/node-${VERSION:-$(wget \
    -qO- https://nodejs.org/dist/latest/ | \
    sed -nE &#39;s|.*&gt;node-(.*)\.pkg&lt;/a&gt;.*|\1|p&#39;)}.pkg&#34; &gt; \
    &#34;$HOME/Downloads/node-latest.pkg&#34; &amp;&amp; sudo installer \
    -store -pkg &#34;$HOME/Downloads/node-latest.pkg&#34; -target \
    &#34;/&#34;
</code></pre>

<p><em><em>Example:</em> installation instruction as provided by <a href="https://nodejs.org/en/download/package-manager/"><code>nodejs</code></a></em></p>

<p>Using <code>homebrew</code>, as demo-ed in next paragraph, may be the most popular approach to install <code>nodejs</code> version on a macOS  machine.</p>

<h3 id="installing-a-nodejs-on-a-mac-using-homebrew">Installing a <code>nodejs</code> on a Mac using <code>homebrew</code></h3>

<p>In case <code>homebrew</code> is not already available on your mac, this is how to get one up and running. On its own, <code>homebrew</code> depends on ruby runtime to be available.</p>

<blockquote><p><code>homebrew</code> is a package manager and software installation tool that makes most developer tools installation a breeze.</p></blockquote>

<pre><code class="language-shell">$ /usr/bin/ruby -e &#34;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)&#34;
</code></pre>

<p><em><em>Example:</em> installation instruction as provided by <a href="https://brew.sh/">brew.sh</a></em></p>

<p>In case the <code>homebrew</code> is already available, it is a good practice to update it before adding new software. In the next code sample, we install some tools such as <code>wget</code>, sometimes useful to download binaries.</p>

<p>how to install things with brew</p>

<pre><code class="language-shell">$ brew install nodejs  
</code></pre>

<p><em><em>Example</em>: install <code>nodejs</code> binaries using <code>homebrew</code></em></p>

<p>After installation, add binary to the PATH [ <code>/usr/local/share/npm/bin</code> ],  <code>$ nano /etc/paths</code>, append the path <code>/usr/local/share/npm/bin</code> at the end of the file.</p>

<blockquote><p><code>homebrew</code> installs packages to their own directory and then symlinks their files into <code>/usr/local</code>.</p></blockquote>

<h2 id="installing-nodejs-on-a-windows-machine">Installing <code>nodejs</code> on a Windows machine</h2>

<p>MacOs and most Linux distributions come with Python and Ruby already enabled. These two languages are somehow required to run successfully a <code>nodejs</code> environment on any server. This is an easy target as <a href="https://nodejs.org/en/download/"><code>nodejs</code></a> gives windows binaries that we can download and install on a couple of clicks.</p>

<h2 id="automated-upgrades">Automated upgrades</h2>

<p>Before we dive into automatic upgrades, we should consider nuances associated to managing a <code>nodejs</code> instance. The updates fall into two major, quite interesting, categories: <strong><em>patch</em></strong> updates and <strong><em>version upgrades</em></strong>.</p>

<p>Following the <a href="https://semver.org/">SemVer ~ <em>aka Semantic Versioning</em></a> standard, it is not recommended to consider <strong><em>minor</em></strong>/<strong><em>major</em></strong> versions for automated upgrades. One of the reasons being that these versions are subject to introducing breaking changes or incompatibility between two versions.  On the other hand, patches are less susceptible to introduce breaking changes, whence ideal candidates for automated upgrades. Another among other reasons, being that security fixes are released as patches to a minor version.</p>

<blockquote><p>We should highlight that it is always better to upgrade at deployment time. The process is even easier in containerized context. We should also automate only patches, to avoid to miss security patches.</p></blockquote>

<p>In the context of Linux, we will use the <strong><em>unattended-upgrades</em></strong> package to do the work.</p>

<pre><code class="language-shell">$ apt-get install unattended-upgrades apticron
</code></pre>

<p><em><em>Example</em>: install unattended-upgrades</em></p>

<p>Two things to fine-tune to make this solution work are: to enable a blacklist of packages we do not to automatically update, and two, to enable particular packages we would love to update on a periodical basis. That is compiled in the following shell scripts.</p>

<pre><code class="language-shell">Unattended-Upgrade::Allowed-Origins {
//  &#34;${distro_id}:${distro_codename}&#34;;
    &#34;${distro_id}:${distro_codename}-security&#34;; # upgrading security patches only 
//   &#34;${distro_id}:${distro_codename}-updates&#34;;  
//  &#34;${distro_id}:${distro_codename}-proposed&#34;;
//  &#34;${distro_id}:${distro_codename}-backports&#34;;
};

Unattended-Upgrade::Package-Blacklist {
    &#34;vim&#34;;
};
</code></pre>

<p><em><em>Example</em>: fine-tune the blacklist and whitelist in <code>/etc/apt/apt.conf.d/50unattended-upgrades</code></em></p>

<p>The next step is necessary to make sure  <strong><em>unattended-upgrades</em></strong> download, install and cleanups tasks have a default period: once, twice a day or a week.</p>

<pre><code class="language-shell">APT::Periodic::Update-Package-Lists &#34;1&#34;;            # Updates package list once a day
APT::Periodic::Download-Upgradeable-Packages &#34;1&#34;;   # download upgrade candidates once a day
APT::Periodic::AutocleanInterval &#34;7&#34;;               # clean week worth of unused packages once a week
APT::Periodic::Unattended-Upgrade &#34;1&#34;;              # install downloaded packages once a day
</code></pre>

<p><em><em>Example</em>: tuning the tasks parameter <code>/etc/apt/apt.conf.d/20auto-upgrades</code></em></p>

<p>This approach works on Linux(Ubuntu), especially deployed in production, but not Windows nor macOS. The last issue, is to be able to report problems when an update fails, so that a human can intervene whenever possible. That is where the second tool <code>apticron</code> in first paragraph intervenes. To make it work, we will specify which email to send messages to, and that will be all.</p>

<pre><code class="language-shell">EMAIL=&#34;&lt;email&gt;@&lt;host.tld&gt;&#34;
</code></pre>

<p><em><em>Example</em>: tuning reporting tasks email parameter <code>/etc/apticron/apticron.conf</code></em></p>

<h2 id="conclusion">Conclusion</h2>

<p>In this article we revisited ways to install <code>nodejs</code> on various platforms. Even though <strong><em><a href="https://getsimple.works/how-to-configure-nodejs-applications#configure-redis-to-run-with-a-nodejs-server">configuration was beyond the scope of this article</a></em></strong>, we managed to get everyday quick refreshers out.</p>

<h2 id="reading-list">Reading list</h2>
<ul><li><a href="https://github.com/nodesource/distributions#manual-installation">Manual Installation ~ NodeSource</a></li>
<li><a href="https://github.com/nodesource/distributions">Distributions ~ NodeSource</a></li>
<li><a href="https://getsimple.works/how-to-configure-nodejs-applications">Configuring <code>nodejs</code> applications</a></li></ul>

<p><a href="https://getsimple.works/tag:nodejs" class="hashtag"><span>#</span><span class="p-category">nodejs</span></a> <a href="https://getsimple.works/tag:homebrew" class="hashtag"><span>#</span><span class="p-category">homebrew</span></a> <a href="https://getsimple.works/tag:UnattendedUpgrades" class="hashtag"><span>#</span><span class="p-category">UnattendedUpgrades</span></a> <a href="https://getsimple.works/tag:nvm" class="hashtag"><span>#</span><span class="p-category">nvm</span></a> <a href="https://getsimple.works/tag:n" class="hashtag"><span>#</span><span class="p-category">n</span></a> <a href="https://getsimple.works/tag:y2020" class="hashtag"><span>#</span><span class="p-category">y2020</span></a> <a href="https://getsimple.works/tag:Jan2020" class="hashtag"><span>#</span><span class="p-category">Jan2020</span></a> <a href="https://getsimple.works/tag:HowTo" class="hashtag"><span>#</span><span class="p-category">HowTo</span></a> <a href="https://getsimple.works/tag:ConfiguringNodejsApplications" class="hashtag"><span>#</span><span class="p-category">ConfiguringNodejsApplications</span></a> <a href="https://getsimple.works/tag:tdd" class="hashtag"><span>#</span><span class="p-category">tdd</span></a> <a href="https://getsimple.works/tag:TestingNodejsApplications" class="hashtag"><span>#</span><span class="p-category">TestingNodejsApplications</span></a></p>
]]></content:encoded>
      <guid>https://getsimple.works/how-to-install-nodejs</guid>
      <pubDate>Fri, 31 Jan 2020 22:03:49 +0000</pubDate>
    </item>
  </channel>
</rss>