Created
August 3, 2016 16:05
-
-
Save jeongho/8dcbab79b75e43c19985a04eb97dcdd2 to your computer and use it in GitHub Desktop.
Pin CentOS repository to 6.7 to prevent yum update goes to 6.8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. disable Base repo | |
sed -i.bak '/^gpgcheck=1/ a enabled=0 ' /etc/yum.repos.d/CentOS-Base.repo | |
2. append Vault repo with CentOS 6.7 | |
#----------------- | |
[C6.7-base] | |
name=CentOS-6.7 - Base | |
baseurl=http://vault.centos.org/6.7/os/$basearch/ | |
gpgcheck=1 | |
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 | |
#enabled=0 | |
[C6.7-updates] | |
name=CentOS-6.7 - Updates | |
baseurl=http://vault.centos.org/6.7/updates/$basearch/ | |
gpgcheck=1 | |
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 | |
#enabled=0 | |
[C6.7-extras] | |
name=CentOS-6.7 - Extras | |
baseurl=http://vault.centos.org/6.7/extras/$basearch/ | |
gpgcheck=1 | |
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 | |
#enabled=0 | |
[C6.7-contrib] | |
name=CentOS-6.7 - Contrib | |
baseurl=http://vault.centos.org/6.7/contrib/$basearch/ | |
gpgcheck=1 | |
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 | |
#enabled=0 | |
[C6.7-centosplus] | |
name=CentOS-6.7 - CentOSPlus | |
baseurl=http://vault.centos.org/6.7/centosplus/$basearch/ | |
gpgcheck=1 | |
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 | |
#enabled=0 | |
3. yum update yum -y | |
4. yum update -y |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment