2

I've been hearing rumors like this:

  1. if you don't update your CentOS minor version, such as from 6.5 to 6.9, some packages is not going to get updates from yum update.

is this true?

  1. If I have to update to the newest minor version, say 6.9 currently, is the following approach "minimal viable"?

( I don't want to update any other software unless absolute unecessary. Effectively I'm asking that if this minimal upgrade would enable me to upgrade any specific software to the newest available version.)

remove other .repo file, and put enabled=0 in the [updates] section and [extras] section in the CentOS-Base.repo file, ensure the [base] section to have enabled=1, then do yum update

7
  • @PimpJuiceIT You're right, backups are essential, but even if backups are in place, nobody wants uncessary rollback, do they? so I'm trying to move as cautious as I can here by asking the 'minimal viable' question.
    – Sajuuk
    Commented Jul 2, 2018 at 5:26
  • Did you ever get a 100% working solution for this yet? I only ask because I recently upgraded a CentOS 7 to the latest kernel version and I believe with this method you can get explicit per whatever version major and minor that's published. Afterwards I just updated a parameter line value in the grub file, etc. rebooted, and viola, it booted to latest kernel I installed by default. I then tested functionality or other critical packages and only needed to yum update one and add a parameter to the fstab for an auto-mount issue. Happy to share initial resources if you're interested. Commented Sep 6, 2018 at 0:39
  • @PimpJuiceIT Did you delete your answer? And btw my question was asking about how to update specific package to the newest, across the OS minor version boundary, have you done it?
    – Sajuuk
    Commented Sep 7, 2018 at 6:54
  • Yes, I did have an answer I deleted as I wasn't sure I understood the question 100% clearly and I didn't want to state wrong for any future readers that may stumble upon your post. I will need to test this out and do more research I suppose as I'm not sure if I have done this or not. You can boot CentOS to any kernel version and have multiple and set one as the default but choose any upon a reboot. I don't think this is too hard to test. What specific "package" are you working with here that you question? Any in particular or what. I should be able to do some test runs. Commented Sep 7, 2018 at 13:09
  • @PimpJuiceIT my scenarios requires that unecessary reboot be avoided in the same way that yum update does not require a reboot.
    – Sajuuk
    Commented Sep 9, 2018 at 7:23

1 Answer 1

3
+50

It is true that currently CentOS have gone to point releases. As the link says :

The CentOS Project provides updates or other changes ONLY for the latest version of each major branch. Thus, if the latest minor version of CentOS-6 is version 6.6 then the CentOS Project only provides updated software for this minor version in the 6 branch. If you are using an older minor version than the latest in a given branch, then you are missing security and bugfix updates.

What this means is that for old minor releases no updates are provided, so what you might as well disable all the yum repositories by adding enabled=0 (or changing the enabled=1 to 0) to each of the [...] sections of the files in /etc/yum.repos.d.

Nevertheless, older minor branches can still be found in the CentOS vault, so you are not stuck if you have not kept up with the current minor release. You do not have to go through the vault in sequence, as the above document also says :

Any minor version is just a snapshot with previous updates, plus the latest batch of new upstream updates, rolled into a new [base] repo with an initially empty [updates] repo.

See also the post How do I keep Centos at version 6.3?.


To instruct yum to install a specific version from the repository :

  1. Modify the file /etc/yum.repos.d/CentOS-Base.repo and change all paths to point to baseurl=http://vault.centos.org/VERSION/....

  2. List all available versions in the repository of your package using the --showduplicates flag. For example for the available versions of the GD extension for PHP:

    # yum --showduplicates list php-gd
    
  3. Once you know the full name of the version to install, specify the package name with the version, for example :

    # yum install php-gd-5.2.6
    

References :

13
  • what do you mean by I'm not stuck? since you've said older minor version will not receive ANY updates (even the security ones)
    – Sajuuk
    Commented Jun 28, 2018 at 9:39
  • All updates are available in the CentOS vault. To go from 6.5 to 6.9 you can modify the file /etc/yum.repos.d/CentOS-Base.repo and change all paths to point to baseurl=http://vault.centos.org/6.9/..., then do a yum update to reflect the changes.
    – harrymc
    Commented Jun 28, 2018 at 9:57
  • what if I just want to upgrade to 6.9 for the name's sake, so I can manually upgrade single package later, rather than upgrade a whole lot of them?
    – Sajuuk
    Commented Jun 28, 2018 at 11:39
  • I mean, what is the difference between 6.5 and 6.9 exactly? apart from the changes in CentOS-Base.repo?
    – Sajuuk
    Commented Jun 28, 2018 at 11:41
  • I can't answer what are the differences, you will have to consult the release notes. It's true that you can manually upgrade one single package and its dependencies at any time using the CentOS vault repo, just as you do with the standard one, except the standard one will not work for you as long as you are not totally updated to the latest minor version minus one.
    – harrymc
    Commented Jun 28, 2018 at 16:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .