将 CentOS 7 升级至最新版本

Author Avatar
青枫 2020年12月08日
  • 在其它设备中阅读本文章

1. 检查你的 CentOS 版本

cat /etc/redhat-release

2. 备份重要数据和目录(例如:/ etc,/ var,/ opt)

建议:对于 VMware 虚拟机,采用一个好的 VMware 快照或运行操作系统和数据的完整备份。(MySQL,Apache,NGINX,DNS 等)

3. 用 yum 更新升级

yum clean all
yum update

4. 重新启动服务器

reboot

5. 再次检查 CentOS 版本 确认系统已成功升级

cat /etc/redhat-release