Ubuntu設定自動化安全性更新
install
1
sudo apt install unattended-upgrades
Verify
1
systemctl status unattended-upgrades
config
1
sudo nano /etc/apt/apt.conf.d/50unattended-upgrades
Blacklist
Unattended-Upgrade::Package-BlacklistEmail Notifications
Unattended-Upgrade::Mail example@email.com;
Unattended-Upgrade::MailOnlyOnError “true”;
Enable Automatic Upgrades
1
sudo nano /etc/apt/apt.conf.d/20auto-upgrades
Testing Automatic Upgrades
1
sudo unattended-upgrades --dry-run --debug
check log
1
/var/log/unattended-upgrades/unattended-upgrades.log
參考:
https://phoenixnap.com/kb/automatic-security-updates-ubuntu
Ubuntu設定自動化安全性更新