Coder Social home page Coder Social logo

distromigrate's Introduction

DistroMigrate

Manual: CentOS 7 upgrade to CentOS8

# Update to CentOS 7 latest version
yum -y update
reboot

# Install rpm tools
yum -y install epel-release
yum -y install yum-utils 
yum -y install rpmconf
rpmconf -a

# Clean useless rpm
package-cleanup --leaves
package-cleanup --orphans

# Install dnf and uninstall yum
yum -y install dnf
dnf -y remove yum yum-metadata-parser
rm -Rf /etc/yum

# Install CentOS 8 release files
dnf -y upgrade
dnf -y install http://vault.centos.org/8.5.2111/BaseOS/x86_64/os/Packages/{centos-linux-repos-8-3.el8.noarch.rpm,centos-linux-release-8.5-1.2111.el8.noarch.rpm,centos-gpg-keys-8-3.el8.noarch.rpm}
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

# Upgrade epel release files
dnf -y upgrade https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf clean all

# Uninstall kernel
rpm -e `rpm -q kernel`
rpm -e --nodeps sysvinit-tools

# DNF distro-sync
dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync
# Key imported successfully
# Running transaction check
# Error: transaction check vs depsolve:
# (NetworkManager >= 1.20 or dhclient) is needed by dracut-network-049-191.git20210920.el8.x86_64
# rpmlib(RichDependencies) <= 4.12.0-1 is needed by dracut-network-049-191.git20210920.el8.x86_64
# To diagnose the problem, try running: 'rpm -Va --nofiles --nodigest'.
# You probably have corrupted RPMDB, running 'rpm --rebuilddb' might fix the issue.
# The downloaded packages were saved in cache until the next successful transaction.
# You can remove cached packages by executing 'dnf clean packages'.

# Resolve RPM conflicts
curl https://vault.centos.org/8.5.2111/BaseOS/x86_64/os/Packages/dracut-network-049-191.git20210920.el8.x86_64.rpm -o dracut-network-049-191.git20210920.el8.x86_64.rpm
rpm -Uvh dracut-network-049-191.git20210920.el8.x86_64.rpm --force --nodeps
rpm -e python36-rpmconf-1.0.22-1.el7.noarch --nodeps

# DNF distro-sync
dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync

# Install kernel and minimal package group
dnf -y install kernel-core
dnf -y groupupdate "Core" "Minimal Install"

# Reboot
reboot

distromigrate's People

Contributors

zdyxry avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.