I have a default AWS image with the version CentOS 6.7. If I run
yum update
I am getting CentOS 6.9.
Is there any way to force yum to update only to version 6.8 and not 6.9?
Yes it is possible. Follow these steps:
Create a yum repo file in /etc/yum.repos.d
. Let's name the file User-Stepped.repo
.
Content of the file would look like the following:
~]# cat /etc/yum.repos.d/User-Stepped.repo
[User_Stepped]
name=A stepped repo - CentOS 6.8
baseurl=http://mirrors.gigenet.com/centos/6.8/os/x86_64/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Execute the following command to update to CentOS 6.8
~]# yum clean all
~]# yum --disablerepo='*' --enablerepo=User_Stepped update
Use the same name in --enablerepo
as you used inside the square brackets of the User-Stepped.repo file.