![如何在 Ubuntu 20.04 上启用自动安全更新](https://linux22.com/image/928640/%E5%A6%82%E4%BD%95%E5%9C%A8%20Ubuntu%2020.04%20%E4%B8%8A%E5%90%AF%E7%94%A8%E8%87%AA%E5%8A%A8%E5%AE%89%E5%85%A8%E6%9B%B4%E6%96%B0.png)
我在 ubuntu 20.04 服务器上有一个 laravel 应用程序。如何启用它以仅自动应用安全更新?
以下是否仅安装安全更新或其他更新:
sudo apt install unattended-upgrades
我的 sudo nano /etc/apt/apt.conf.d/50unattended-upgrades 如下:
Unattended-Upgrade::Allowed-Origins {
"${distro_id}:${distro_codename}";
"${distro_id}:${distro_codename}-security";
// Extended Security Maintenance; doesn't necessarily exist for
// every release and this system may not have it installed, but if
// available, the policy for updates is such that unattended-upgrades
// should also install from here by default.
"${distro_id}ESMApps:${distro_codename}-apps-security";
"${distro_id}ESM:${distro_codename}-infra-security";
//"${distro_id}:${distro_codename}-updates";
//"${distro_id}:${distro_codename}-proposed";
//"${distro_id}:${distro_codename}-backports";
};
我还需要做其他事情吗?
答案1
答案2
我个人的偏好如下:重新配置会弹出一个文本用户界面来确认,然后就完成了。
sudo apt-get 安装无人值守升级 sudo dpkg-reconfigure 无人值守升级