在EC2实例上更新Ubuntu

0

【以下的问题经过翻译处理】 我正在一台EC2实例上运行Ubuntu 22.04。它正在使用Apache2作为多个域名的虚拟主机。

当我使用SSH连接它时,我会得到以下输出:

steve@steve-Inspiron-3268:~$ ssh -i ~/.ssh/key-ub-20220725-1.pem ubuntu@13.41.164.129
Welcome to Ubuntu 22.04 LTS (GNU/Linux 5.15.0-1017-aws x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Thu Oct  6 14:52:02 UTC 2022

  System load:  0.0                Processes:             110
  Usage of /:   26.1% of 24.05GB   Users logged in:       1
  Memory usage: 33%                IPv4 address for eth0: 172.31.32.80
  Swap usage:   0%

 * Ubuntu Pro delivers the most comprehensive open source security and
   compliance features.

   https://ubuntu.com/aws/pro

57 updates can be applied immediately.
To see these additional updates run: apt list --upgradable


*** System restart required ***
Last login: Thu Oct  6 14:44:47 2022 from 3.8.37.27
ubuntu@ip-172-31-32-80:~$ 

我需要运行以下三个命令来更新系统吗?

sudo apt update
sudo apt upgrade
sudo systemctl reload apache2

这是我需要定期执行的任务还是可以指示Ubuntu定期执行。我不想编写脚本并使用CRON来运行它,因为这超出了我的经验范围,我正在尽可能保持系统简单化。

profile picture
전문가
질문됨 5달 전25회 조회
1개 답변
0

【以下的回答经过翻译处理】 仅重启apache是不够的。你需要重启服务器,如你的机器提示所示:

*** System restart required ***

内核更新需要重新启动,否则它们不会被应用。

如果你想要自动更新,你需要安装“unattended-upgrades”并配置你希望自动安装的内容。

profile picture
전문가
답변함 5달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인