Checklist cập nhật Ubuntu Server bảo mật production 2026

Nhiều server Ubuntu bị xuống cấp bảo mật chỉ vì update không đều và thiếu kiểm tra sau update. Bài này là checklist ngắn gọn để update an toàn, giảm rủi ro downtime.

Checklist trước khi update

sudo uptime
sudo df -h
sudo free -m
sudo systemctl --failed

Đảm bảo server còn đủ disk, RAM và không có service đang fail trước khi chạm vào package.

Update packages đúng trình tự

sudo apt update
sudo apt list --upgradable
sudo apt upgrade -y

Với kernel/libc update, bạn nên chốt khung thời gian reboot ngay từ đầu để tránh kéo dài trạng thái “pending reboot”.

Bật unattended-upgrades cho security patch

sudo apt install unattended-upgrades -y
sudo dpkg-reconfigure --priority=low unattended-upgrades

Kiểm tra sau update

sudo systemctl --failed
sudo journalctl -p 3 -xb --no-pager | tail -n 100
sudo needrestart

Best practices cho production

  • Snapshot/backup trước update lớn
  • Staging test trước production
  • Ghi runbook rollback tối thiểu
  • Lịch update cố định hàng tuần/tháng

Update tốt không chỉ là chạy lệnh, mà là có quy trình và hậu kiểm rõ ràng. Chỉ cần chuẩn hóa checklist, server sẽ ổn định hơn đáng kể.

Leave a Comment

Your email address will not be published. Required fields are marked *