我在 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 install 無人升級 sudo dpkg-reconfigure 無人升級