Identify CentOS releases

Issues related to applications and software problems and general support
Post Reply
shpad09
Posts: 3
Joined: 2021/04/11 03:44:31

Identify CentOS releases

Post by shpad09 » 2021/04/11 03:57:19

Hi, I have a script running periodically, that monitors this website to find the latest CentOS release.
https://cloud.centos.org/centos/
I just use a wget command like this - “wget -qO index.html $URL”

Is there a webpage that returns a json file, that has the list of CentOS releases? Like how there is a list for fedora releases- https://getfedora.org/releases.json?

If not, is there a better way to get the list of CentOS releases? Please let me know.

Thanks!

User avatar
jlehtone
Posts: 3478
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Identify CentOS releases

Post by jlehtone » 2021/04/11 12:25:02

If you run yum update regularly, then your system is always at current release.
If you don't run yum update, then your system lacks (security) updates and has no support.

CentOS Linux releases occur some time after corresponding RHEL point update release. That is about every 6 months.
CentOS Linux 7 is already at its final release, because the RHEL 7.9 is the last point update.

User avatar
TrevorH
Forum Moderator
Posts: 30677
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Identify CentOS releases

Post by TrevorH » 2021/04/11 12:28:55

And CentOS 8 has one, possibly 2, more point releases left before it goes EOL entirely. RHEL 8.4 should be along fairly soon if they stick to the 6 month cadence of releases and 8.5 should be along shortly before CentOS 8 goes EOL but whether there will be time to build and release it before the EOL date is anyone's guess.
CentOS 6 died in November 2020 - migrate to a new version!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

shpad09
Posts: 3
Joined: 2021/04/11 03:44:31

Re: Identify CentOS releases

Post by shpad09 » 2021/04/11 23:37:26

Thanks for your responses.

Sorry if I was not clear, I would like to clarify that I am not trying to update my machine with the latest centOS image. So I do not think the yum commands can be used.
I basically want my script to identify the latest CentOS release whenever it is run. I am doing something like this at the moment to get that.
wget -qO index.html https://cloud.centos.org/centos/
CentOS_VERSION=`cat index.html | sed -e 's/.*>\([0-9]\+\)\/<.*/\1/' | sort -rn | head -n 1 | tr -d ' '` - which returns 8 at the moment
I then try to find the download link for the latest image and download the image and store it in our internal repo(If that version image is not already present).
For now I am ignoring the *-Stream versions. So, I am selecting CentOS 8 as my latest release.
The script goes to this website - https://cloud.centos.org/centos/8/x86_64/images/ and downloads the latest GenericCloud qcow2 image - CentOS-8-GenericCloud-8.3.2011-20201204.2.x86_64.qcow2.

Is this the best way to identify the latest release? Please let me know

User avatar
TrevorH
Forum Moderator
Posts: 30677
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Identify CentOS releases

Post by TrevorH » 2021/04/12 00:13:23

No, because both CentOS 7 and 8 are current versions so from the point of view of major version, there is no "latest". And due to Red Hat's recent announcement about the future of CentOS, CentOS 8 will go EOL at the end of 2021 while CentOS 7 will continue until 2024.
CentOS 6 died in November 2020 - migrate to a new version!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

shpad09
Posts: 3
Joined: 2021/04/11 03:44:31

Re: Identify CentOS releases

Post by shpad09 » 2021/04/23 20:46:10

Ah makes sense. Thanks for the clarification!

One more question. Lets say I would like to identify the latest release of Centos8 x86_64 qcow2 image. Is there any other way other than pick the last modified image from here - https://cloud.centos.org/centos/8/x86_64/images/ or sort the image filenames and then identify the newest image?

Please let me know.

Thanks
Shweta

Post Reply

Return to “CentOS 8 - General Support”