如何在Ubuntu Server上进行自动升级?

前端之家收集整理的这篇文章主要介绍了如何在Ubuntu Server上进行自动升级?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在ubuntu服务器上跟踪了 documentation for enabling automatic upgrades,但它根本没有真正更新任何东西.

我的/etc/apt/apt.conf.d/50unattended-upgrades看起来几乎和默认值一样.

// Automatically upgrade packages from these (origin,archive) pairs
Unattended-Upgrade::Allowed-Origins {
        "Ubuntu karmic-security";
        "Ubuntu karmic-updates";
};

// List of packages to not update
Unattended-Upgrade::Package-Blacklist {
//      "vim";
//      "libc6";
//      "libc6-dev";
//      "libc6-i686";
};

// Send email to this address for problems or packages upgrades
// If empty or unset then no email is sent,make sure that you
// have a working mail setup on your system. The package 'mailx'
// must be installed or anything that provides /usr/bin/mail.
Unattended-Upgrade::Mail "pupeno@example.com";


// Automatically reboot *WITHOUT CONFIRMATION* if a 
// the file /var/run/reboot-required is found after the upgrade 
//Unattended-Upgrade::Automatic-Reboot "false";

目录/ var / log / unattended-upgrades /为空.运行/etc/init.d/unattended-upgrades start并不是很好:

root@mozart:~# /etc/init.d/unattended-upgrades start
Checking for running unattended-upgrades: root@mozart:~#

似乎有些东西被破坏了,但我不确定为什么.

我有待处理的更新,但它们未被应用:

root@mozart:~# aptitude safe-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Reading extended state information      
Initializing package states... Done
The following packages will be upgraded:
  linux-libc-dev 
1 packages upgraded,0 newly installed,0 to remove and 0 not upgraded.
Need to get 0B/743kB of archives. After unpacking 4096B will be used.
Do you want to continue? [Y/n/?]

在我拥有的所有服务器中,无人值守的升级似乎已被禁用:

root@mozart:~# apt-config shell UnattendedUpgradeInterval APT::Periodic::Unattended-Upgrade
root@mozart:~#

有什么想法我错过了什么?

你查过/etc/apt/apt.conf.d/10periodic吗?

它应该有最后一行

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

猜你在找的Ubuntu相关文章