我在 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 无人值守升级