Обновление CentOS до последней версии

Задача:
---------------------------------------------------------------Обновить версию системы CentOS до последней
Проверяем текущую версию
[root@localhost ~]# cat /etc/redhat-release CentOS Linux release 7.7.1908 (Core) [root@localhost ~]#
Устанавливаем EPEL репозиторий
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Устанавливаем необходимые для обновления пакеты
yum -y install rpmconf yum-utils
yum install epel-release yum-utils yum install rpmconf
Выполняем сверку конфигов
[root@localhost ~]# rpmconf -a Configuration file `/etc/nsswitch.conf' -rw-r--r-- 1 root root 1938 Aug 6 2019 /etc/nsswitch.conf.rpmnew -rw-r--r--. 1 root root 1746 Aug 29 13:24 /etc/nsswitch.conf ==> Package distributor has shipped an updated version. What would you like to do about it ? Your options are: Y or I : install the package maintainer's version N or O : keep your currently-installed version D : show the differences between the versions M : merge configuration files Z : background this process to examine the situation S : skip this file The default action is to keep your current version. *** aliases (Y/I/N/O/D/Z/S) [default=N] ? Your choice: N [root@localhost ~]#
Удаляем ненужные пакеты, например те которые были установлены не из репозиториев:
package-cleanup --orphans package-cleanup --leaves
Устанавливаем dnf и удаляем yum
yum install dnf dnf remove yum yum-metadata-parser rm -Rf /etc/yum
Обновляем систему с помощью dnf:
dnf upgrade
Добавляем новые репозитории centos и epel:
dnf upgrade https://mirror.yandex.ru/centos/8/BaseOS/x86_64/os/Packages/centos-release-8.1-1.1911.0.8.el8.x86_64.rpm dnf upgrade https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Удаляем временные файлы dnf:
[root@localhost ~]# dnf clean all 43 files removed [root@localhost ~]#
Удаляем ядра и конфликтные пакеты:
[root@localhost ~]# rpm -e `rpm -q kernel` [root@localhost ~]# rpm -e --nodeps sysvinit-tools [root@localhost ~]#
Выполняем обновление системы:
dnf --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync
Возможные ошибки:
Failed to synchronize cache for repo 'base', ignoring this repo. Failed to synchronize cache for repo 'updates', ignoring this repo.
Свежие комментарии