How to Upgrade CentOS 7 to CentOS 8

General support questions
lattimro
Posts: 28
Joined: 2021/06/14 13:38:19

How to Upgrade CentOS 7 to CentOS 8

Post by lattimro » 2021/06/14 15:22:10

Hi Community,
cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
uname -a
Linux centos 3.10.0-1160.31.1.el7.x86_64 #1 SMP Thu Jun 10 13:32:12 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

I tried to upgrade CentOS 7 to CentOS 8 and I followed https://www.tecmint.com/upgrade-centos-7-to-centos-8/ and I got some dependencies issues as you can see below. I updated the older link from tecmint to 8.4-1.2105.el8 (available on mirror)
Problem: cannot install the best update candidate for package epel-release-7-13.noarch
- nothing provides redhat-release >= 8 needed by epel-release-8-10.el8.noarch


Thanks!

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to Upgrade CentOS 7 to CentOS 8

Post by TrevorH » 2021/06/14 15:41:09

There is no upgrade from one CentOS major version to the next. There may be web pages out there claiming you can but you cannot.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

lattimro
Posts: 28
Joined: 2021/06/14 13:38:19

Re: How to Upgrade CentOS 7 to CentOS 8

Post by lattimro » 2021/06/14 16:48:33

thank you!

rpm's are available on mirror below but still error. I understand the upgrade to a major version is not possible don't understand why but is good enough for now.

[ ]centos-gpg-keys-8-2.el8.noarch.rpm 2020-11-10 00:35 12K
[ ]centos-linux-release-8.4-1.2105.el8.noarch.rpm 2021-05-27 13:23 22K
[ ]centos-linux-repos-8-2.el8.noarch.rpm 2020-11-10 00:35 20K
[root@centos brad]# dnf upgrade -y http://mirror.centos.org/centos/8/BaseO ... noarch.rpm}
Last metadata expiration check: 0:14:08 ago on Mon 14 Jun 2021 11:46:46 AM EDT.
centos-linux-release-8.4-1.2105.el8.noarch.rpm 61 kB/s | 22 kB 00:00
centos-gpg-keys-8-2.el8.noarch.rpm 58 kB/s | 12 kB 00:00
centos-linux-repos-8-2.el8.noarch.rpm 71 kB/s | 20 kB 00:00
Package centos-linux-release not installed, cannot update it.
No match for argument: /var/cache/dnf/commandline-5fda33494c9fb882/packages/centos-linux-release-8.4-1.2105.el8.noarch.rpm
Package centos-gpg-keys not installed, cannot update it.
No match for argument: /var/cache/dnf/commandline-5fda33494c9fb882/packages/centos-gpg-keys-8-2.el8.noarch.rpm
Package centos-linux-repos not installed, cannot update it.
No match for argument: /var/cache/dnf/commandline-5fda33494c9fb882/packages/centos-linux-repos-8-2.el8.noarch.rpm
Error: No packages marked for upgrade.
Last edited by lattimro on 2021/06/23 17:23:56, edited 1 time in total.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to Upgrade CentOS 7 to CentOS 8

Post by TrevorH » 2021/06/14 17:31:07

Back up your data, make a note of the customisations you've made to your apps then reinstall the system from scratch with the new version, recustomise and restore your data.

You may also want to review your intended use of CentOS 8 as it goes out of support at the end of 2021 which is 3 years sooner than staying on CentOS 7.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

mehrdadali14
Posts: 5
Joined: 2016/02/20 07:15:05
Location: Islamabad
Contact:

Re: How to Upgrade CentOS 7 to CentOS 8

Post by mehrdadali14 » 2021/06/25 05:38:18

I found this article about upgrade from CentOS 7 to CentOS 8
i never tried but i think is working fine

https://netshopisp.medium.com/how-to-up ... 2db96a189b
Cheapest Dedicated Server and VPS Provider
full Cpanel and WordPress support

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to Upgrade CentOS 7 to CentOS 8

Post by TrevorH » 2021/06/25 09:11:20

I found this article about upgrade from CentOS 7 to CentOS 8
It's unsupported and stands a very good chance of rendering your machine unbootable or otherwise damaging it.

Do it the right and documented way. Set up a parallel system, migrate your apps and data to it, decommission the old one.

There is NO UPGRADE.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

kluge
Posts: 3
Joined: 2021/11/20 18:37:39

Re: How to Upgrade CentOS 7 to CentOS 8

Post by kluge » 2021/11/20 18:47:01

Dang. Ah, well... my VPS provider apparently only goes as high as 8.0, so I guess I have nothing to lose by backing it up and giving the unofficial upgrade to 8 a try... worst case is I gotta reimage it, then scream at the VPS folks to get 'em to get some current releases available ;) Wish me luck!

-kluge

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to Upgrade CentOS 7 to CentOS 8

Post by TrevorH » 2021/11/20 19:06:20

Well since CentOS 8 goes EOL in about 6 weeks there really is no point in even attempting an "upgrade" from 7.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

kluge
Posts: 3
Joined: 2021/11/20 18:37:39

Re: How to Upgrade CentOS 7 to CentOS 8

Post by kluge » 2021/11/20 19:35:52

Extremely valid point, sir.

Maybe I just need to update the repo sites on the machine so I can upgrade the stuff I need. (for example, whatever I've got in there now only installs Python3 3.6.8, and I'd love to run 3.10... installing from src is not working out for a bunch of reasons.)

Thanks!

--kluge

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to Upgrade CentOS 7 to CentOS 8

Post by TrevorH » 2021/11/20 22:02:07

Even CentOS 8 only has python 3.9. If you want to run bleeding edge things then RHEL/CentS is probably not the best choice. Those are about stability not about "ooh shiny".
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply