How in Ubuntu to make an update on a schedule? Or how to implement, to update downloaded to the server, and then according to the schedule installed on all machines with Ubuntu?

    2 answers 2

    http://help.ubuntu.ru/wiki/ubuntu_server/package management/automatic_updates

    • one
      Add to the answer the minimum required solution example (information on the link can be deleted and the answer will lose value). - Nicolas Chabanovsky ♦

    Ubuntu Server Guide »Package Management» Automatic Updates :

    The unattended-upgrades package can be used to automatically install upgraded packages and can be configured to update all packages or only security updates. To get started, install the package by typing the following in the terminal:

    sudo apt-get install unattended-upgrades 

    To configure unattended-upgrades, edit /etc/apt/apt.conf.d/50unattended-upgrades and correct the following to suit your needs:

     Unattended-Upgrade::Allowed-Origins { "Ubuntu precise-security"; // "Ubuntu precise-updates"; }; 

    Of course, packages can be placed on the “black list” and, therefore, will not be updated automatically. To block a package update, add it to the list:

     Unattended-Upgrade::Package-Blacklist { // "vim"; // "libc6"; // "libc6-dev"; // "libc6-i686"; }; 

    To allow automatic updates, edit /etc/apt/apt.conf.d/10periodic and set the appropriate apt configuration options:

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

    The settings above update the list of packages, download and install available updates every day. Local archive downloads cleaned every week.

    The results of unattended-upgrades are saved in the / var / log / unattended-upgrades log. Notifications

    Configuring Unattended-Upgrade::Mail in the /etc/apt/apt.conf.d/50unattended-upgrades file will allow unattended-upgrades to send email messages to the administrator specifying which packages need to be upgraded or have problems.

    Another useful package is apticron. The apticron package configures the cron task to send email messages to the administrator for any packages in the system for which there are updates, as well as a list of changes for each package.

    To install apticron package, enter in the terminal:

     sudo apt-get install apticron 

    Once the package is installed, edit /etc/apticron/apticron.conf to set the email address and other options:

     EMAIL="root@example.com"