debian设置自动更新安全更新
Contents
安装必要软件包
apt install unattended-upgrades启用自动更新功能
dpkg-reconfigure -plow unattended-upgrades这步操作会在 /etc/apt/apt.conf.d/20auto-upgrades 自动生成配置,确保更新服务会在后台运行。
配置更新策略
vi /etc/apt/apt.conf.d/50unattended-upgradesUnattended-Upgrade::Remove-Unused-Dependencies "true";
Unattended-Upgrade::Automatic-Reboot "true";
Unattended-Upgrade::Automatic-Reboot-Time "04:00";