We all are familier with updating our os.But what about downgrading...Its little risky..right?...Let me explain you about it..
1.First we need to downgrade the
kernel.Here we want to downgrade from Centos 6.9 to 6.8
Find out kernel version running on
centos 6.8. I found it as
kernel-2.6.32-642.15.1.el6
# curl -O http://vault.centos.org/6.8/updates/x86_64/Packages/kernel-2.6.32-642.15.1.el6.x86_64.rpm
(
ie, downloading the required kernel version)
#yum install
kernel-2.6.32-642.15.1.el6.x86_64.rpm
(install the kernel version)
2. Now find the kernels present in
grub
grep '^[[:space:]]*kernel'
/boot/grub/grub.conf
From the list, identify the kernel
that you want to set as default. Each kernel in the list is assigned by GRUB a
numeric entry value starting from 0 in an increasing order. That is, the first
entry assigned 0, the second entry assigned 1, etc.
Open /boot/grub/grub.conf with a text
editor, and set GRUB_DEFAULT to the numeric entry value for the kernel you
chose as the default. In this example, I choose the kernel 2.6.32-642 as the default kernel.
# vi
/boot/grub/grub.conf
default=0
3.Now we want to make changes in our
Centos-Vault.repo.Here we want to enable all entries for Centos 6.8
#vi
/etc/yum.repos.d/CentOS-Vault.repo
[C6.8-base]
name=CentOS-6.8 - Base
baseurl=http://vault.centos.org/6.8/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
[C6.8-updates]
name=CentOS-6.8 - Updates
baseurl=http://vault.centos.org/6.8/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
[C6.8-extras]
name=CentOS-6.8 - Extras
baseurl=http://vault.centos.org/6.8/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
[C6.8-contrib]
name=CentOS-6.8 - Contrib
baseurl=http://vault.centos.org/6.8/contrib/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
[C6.8-centosplus]
name=CentOS-6.8 - CentOSPlus
baseurl=http://vault.centos.org/6.8/centosplus/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
--------------------------------------------------------------------------------------------------------------------------
4.Now refresh the repolist
#yum repolist
5.Downgrade the the redhat-release package
to complete the process
#yum downgrade redhat-release
6. Confirm the downgrade by showing the contents
of /etc/redhat-release:
# cat /etc/redhat-release
Red Hat Enterprise Linux Server
release 6.4