CentOS7.9 降级 7.2

一开始我以为会有很多有依赖问题,先做了DVD挂载然后制作离线yum源, 结果就这两个包降级了就行了。

yum downgrade initscripts-9.49.30-1.el7.x86_64 centos-release-7-2.1511.el7.centos.2.10.x86_64

离线源制作

1. 挂载镜像文件

2. centos 里将镜像挂载到指定目录

ls /dev/cdrom
mount -t iso9660 -o loop /dev/cdrom /mnt/cdrom/

如果你想开机自动挂载
vim /etc/fstab
/dev/cdrom /mnt/cdrom iso9660 defaults 0 0

3. yum 源编写

vim /etc/yum.repos.d/centos7.2-old.repo

# vim centos7.2-old.repo
[centos7.2-old]
name=centos7.2-old
baseurl=file:///mnt/cdrom
enable=1
gpgcheck=0

yum makecache

4. 查看源里的软件包信息

yum repo-pkgs centos7.2-old list | grep "centos-release"

yum --disablerepo "*" --enablerepo centos7.2-old list | grep "centos-release"