如何升级 Amazon Linux?

如何升级 Amazon Linux?

Amazon Linux 是基于 CentOS 6 吗?我想升级我的 Amazon Linux 实例

[myuser@mymachine ~]$ uname -a
Linux sandbox2.evo-text.com 4.9.38-16.33.amzn1.x86_64 #1 SMP Thu Jul 20 01:31:29 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

CentOS 7,但我对如何做到这一点感到困惑。我可以“yum install update”,但我想知道是否必须更新位于 /etc/yum.repos.d/centos.repo 的“Centos.repo”文件

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os
enabled=1
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
failovermethod=priority
gpgcheck=0

#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=updates
enabled=1
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
failovermethod=priority
gpgcheck=0

[CentOS-base]
name=CentOS-6 - Base
mirrorlist=http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#released updates
[CentOS-updates]
name=CentOS-6 - Updates
mirrorlist=http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=updates
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[CentOS-extras]
name=CentOS-6 - Extras
mirrorlist=http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=extras
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

我是否需要更改文件的内容才能升级我的 Amazon Linux 实例?如果需要,它们需要是什么?

答案1

CentOS 并不意味着在主要版本之间进行升级,AWS 会告诉您销毁实例并使用 CentOS 7 AMI 启动一个新实例。

相关内容