Difference between revisions of "Automatic updates"

(Created page with "It's of the utmost importance to keep your system up-to-date! Both for security, performances and maintenance reasons. There are 2 ways to achieve automatic updates: * On '...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 +
[[Category:Linux]]
 
It's of the utmost importance to keep your system up-to-date! Both for security, performances and maintenance reasons.  
 
It's of the utmost importance to keep your system up-to-date! Both for security, performances and maintenance reasons.  
  
Line 38: Line 39:
  
  
==Configuration (1) Set the update frequency==
+
==Configuration (2) Set the update frequency==
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">

Latest revision as of 17:02, 10 June 2014

It's of the utmost importance to keep your system up-to-date! Both for security, performances and maintenance reasons.


There are 2 ways to achieve automatic updates:

  • On Ubuntu* distro you can use a dedicated package
  • On Debian* distro you have to setup a cronjob



Ubuntu

Installation

apt-get install unattended-upgrades


Configuration (1) Packages to update

vim /etc/apt/apt.conf.d/50unattended-upgrades


Now you have to choose which type of updates you'd like to have. Uncomment the *-updates:

Unattended-Upgrade::Allowed-Origins {
         "${distro_id}:${distro_codename}-security";
         "${distro_id}:${distro_codename}-updates";
//      "${distro_id}:${distro_codename}-proposed";
//      "${distro_id}:${distro_codename}-backports";
};


Configuration (2) Set the update frequency

vim /etc/apt/apt.conf.d/10periodic


Put the following:

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "7";
APT::Periodic::Unattended-Upgrade "1";



References

Ubuntu official how-to: https://help.ubuntu.com/14.04/serverguide/automatic-updates.html