首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无人值守的升级是如何开始的,我如何修改它的时间表?

无人值守的升级是如何开始的,我如何修改它的时间表?
EN

Unix & Linux用户
提问于 2017-02-05 14:42:05
回答 3查看 41.5K关注 0票数 39

我想知道是谁在我的debian中开始无人看管的升级:

  1. 我的手册页描述这个程序可以下载和安装自动和无人值守的安全升级,注意只从配置配置APT源代码安装软件包,并检查有关配置文件更改的dpkg提示。所有输出都被记录到/var/log/无人值守-Upgrades.log。此脚本是apt::周期::无人值守-升级选项的后端,并设计为从cron运行(例如,通过/etc/cron.day/apt)。
  2. 但是我的crontab没有通过crontab命令显示任何内容:@ stefano :/etc/cron.day$ crontab -l,no crontab for stefano# crontab -l no crontab for root
  3. 但我的无人值守-升级工作很好!(我无人值守的升级日志文件):2017-02-05 12:42:42:42,835 INFO初始黑名单软件包: 2017-02-05 12:42:42,866 INFO初始白名单软件包: 2017-02-05 12:42:42,868信息启动无人值守的升级脚本2017-02-05 12:42:42:42,870信息允许的来源是:'o=Debian,n=jessie','o=Debian,n=jessie-updates','o=Debian,n=jessie-backports','origin=Debian,codename=jessie,label=Debian-Security‘ 2017-02-05 12:43:15,848

如果我想改变我的日程,我必须在哪里检查/修改?

EN

回答 3

Unix & Linux用户

回答已采纳

发布于 2017-02-05 15:33:08

如果我想改变我的日程,我必须在哪里检查/修改?

unattended-upgrades被配置为自动应用。

要验证它是否检查了/etc/apt/apt.conf.d/20auto-upgrades文件,您将得到:

代码语言:javascript
复制
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";

要修改它,您应该运行以下命令:

代码语言:javascript
复制
dpkg-reconfigure -plow unattended-upgrades 

样本输出:

代码语言:javascript
复制
 Applying updates on a frequent basis is an important part of keeping 
 systems secure. By default, updates need to be applied manually using
 package management tools.

 Alternatively, you can choose to have this system automatically download 
 and install security updates.                                                                   

     Automatically download and install stable updates?

选择NO停止自动更新

再次验证/etc/apt/apt.conf.d/20auto-upgrades,您应该得到:

代码语言:javascript
复制
APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Unattended-Upgrade "0";

编辑

要运行unattended-upgrades每周一次,请按以下方式编辑/etc/apt/apt.conf.d/20auto-upgrades

代码语言:javascript
复制
APT::Periodic::Update-Package-Lists "7";
APT::Periodic::Unattended-Upgrade "1";

详细的示例可以在Debian-Wiki:自动调用:/etc/apt/apt.conf.d/02周期上找到。

APT::Periodic::Update-Package-Lists

此选项允许您指定刷新包列表的频率(以天为单位)。apticron用户可以不使用此变量,因为apticron已经完成了此任务。

票数 21
EN

Unix & Linux用户

发布于 2018-05-22 13:31:33

/etc/crontab有一个run-parts /etc/cron.daily行,它引用一个包含执行exec /usr/lib/apt/apt.systemd.daily/etc/cron.daily/apt-compat文件的文件夹。

票数 3
EN

Unix & Linux用户

发布于 2017-02-05 16:05:03

anacron启动unattended-upgrades和其他系统-cron-作业。

代码语言:javascript
复制
cat /etc/anacrontab 
# /etc/anacrontab: configuration file for anacron

# See anacron(8) and anacrontab(5) for details.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
HOME=/root
LOGNAME=root

# These replace cron's entries
1   5   cron.daily  run-parts --report /etc/cron.daily
7   10  cron.weekly run-parts --report /etc/cron.weekly
@monthly    15  cron.monthly    run-parts --report /etc/cron.monthly
票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/342663

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档