Difference between revisions of "Automatic updates"
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. | ||
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
Contents
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