LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   CentOS (https://www.linuxquestions.org/questions/centos-111/)
-   -   how to update from centos 7.2 to 7.6 (https://www.linuxquestions.org/questions/centos-111/how-to-update-from-centos-7-2-to-7-6-a-4175672028/)

luiscssz 03-26-2020 02:58 PM

how to update from centos 7.2 to 7.6
 
Hi All,

my scope: update the cluster of my chair from centos 7.2 to centos 7.6 (and all dependencies) and not to the last available version (8).

reason: I have to install a specific version of ANSYS 19R2(multiphysics simulation software), which only works under 7.6.

I wanted to use the following command:

yum update doc

but I am not sure if the release would be updated autmatically from 7.2 to 8. Do you hav any experience with?

Already tried without success:

downloaded the Everything.iso image from here . After validation of the image file using the following procedure (see following 3 links: link1 , link2 and link3 ), the next issue appears: I cannot mount the .iso file (using the following procedure), when I use:
$mount -o -loop CentOS-7-x86_64-Everything-1810.iso /media/7_6_centos/

mount: /dev/loop0 is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.

Any idea will be wellcome because I have the cluster completely stopped.

Thanks in advance.

Luis

scasey 03-26-2020 03:32 PM

yum update should bring you to the current version of 7, which is CentOS Linux 7.7.1908.
You should be running updates periodically.

luiscssz 03-26-2020 04:00 PM

Hi scasey,

I would prefer to update to the last one as you recommend but as we simulate in another bigger cluster, in which centos 7.6 is installed, we have to replicate the same conditions in our cluster to avoid issues with different OS, softwares, etc...

is not the current release the 8 one?

chrism01 03-30-2020 02:38 AM

Check this page for methods to lock the OS at a given version (inc subversion) eg 7.6 https://avinetworks.com/docs/18.2/ho...ecific-update/

ehartman 03-30-2020 07:14 AM

Quote:

Originally Posted by luiscssz (Post 6104692)
my scope: update the cluster of my chair from centos 7.2 to centos 7.6 (and all dependencies) and not to the last available version (8).

You can only update to the latest available 7.x version, as previous point updates are deleted from the servers when the next one gets released.
The 7.6 directory ON those servers now only contain a 'readme' file:
Quote:

This directory (and version of CentOS) is deprecated. For normal users,
you should use /7/ and not /7.6.1810/ in your path.
So when you use /7/ in your repo list you will get updated to the current latest 7.x release.

The current (and latest) release of CentOS 7 is 7.7.1908 (which means it is based on the 2019/08 sources from RHEL). But there probably will be a 7.8 one later this year.

ehartman 03-30-2020 07:20 AM

Quote:

Originally Posted by luiscssz (Post 6104723)
is not the current release the 8 one?

8.1.1911 for the 8 series,
7.7.1908 for the 7 series
and even the 6 series of CentOS is still supported:
6.10 is the latest (and probably the last) point update for that.
It was released in 2018 (july).

BTW: the 6 series was the last one to still support a 32-bit kernel and iso images:
Code:

$ ls -l 6.10/isos
i386                07/03/2018        12:00:00 AM
x86_64                07/02/2018        12:00:00 AM


knudfl 03-30-2020 08:37 AM

CentOS 7.6 repo URL's
os/x86_64/ : http://vault.centos.org/7.6.1810/os/x86_64/
updates/x86_64/ : http://vault.centos.org/7.6.1810/updates/x86_64/

Replace the repo files in /etc/yum.repos.d/ wih this file
Code:

[CentOS 7.6]
name=CentOS-7.6-x86_64
baseurl=http://vault.centos.org/7.6.1810/os/x86_64/
enabled=1
gpgcheck=1

[CentOS 7.6-updates]
name=CentOS-7.6-updates-x86_64
baseurl=http://vault.centos.org/7.6.1810/updates/x86_64/
enabled=1
gpgcheck=1


ehartman 03-30-2020 08:58 AM

Quote:

Originally Posted by knudfl (Post 6105900)

Note that this vault site is an archive:
Quote:

This is _NOT_ an updated tree for installing CentOS Linux : It is a snapshot of the older trees that have been removed from the main CentOS servers as new point releases are released.
This is provided for reference and to provide access to older archived versions, and we do not put security updates into the trees on this server.
So even all updates in this tree are more than half a year out of date:
Packages/ 2019-09-20 01:58

The OP would be best advised to update all of the CentOS systems, both the clients and servers, to 7.7 (and 7.8 as soon as it will be released).
Note that CentOS (following RHEL) will only issue bugfixes and security patches in point releases, NOT newer versions.So everything should stay working after updating to 7.7

luiscssz 04-02-2020 03:00 AM

Quote:

Originally Posted by chrism01 (Post 6105826)
Check this page for methods to lock the OS at a given version (inc subversion) eg 7.6 https://avinetworks.com/docs/18.2/ho...ecific-update/

Hi chrism01,


thanks for the link. I have not yet checked this way, but I have found my mistake when I mounted the .iso image (see my first thread).

$mount -o -loop CentOS-7-x86_64-Everything-1810.iso /media/7_6_centos/

mount: /dev/loop0 is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.

The first line is actually not an error but a warning "mount: /dev/loop0 is write-protected, mounting read-only". In my case I wanted to read only the -iso file, so I can use "mount -r" -r= read-only or live with this warning. Thatīs all.

For the second line"mount: wrong fs type, bad option, bad superblock on /dev/loop0,... " I can avoid that using "-t auto", allowing linux to detect automatically the type:
mount -t auto CentOS-7-x86_64-Everything-1810.iso

After that I followed the instructions 2-7 (see here) and the update from CentOS 7.2 to 7.6 worked.
If you want to update other packages, which are not dependent of the centos-release 7.6, I have used the famous:
yum update < names of packages to be installed>

luiscssz 04-02-2020 03:05 AM

Quote:

Originally Posted by knudfl (Post 6105900)
CentOS 7.6 repo URL's
os/x86_64/ : http://vault.centos.org/7.6.1810/os/x86_64/
updates/x86_64/ : http://vault.centos.org/7.6.1810/updates/x86_64/

Replace the repo files in /etc/yum.repos.d/ wih this file
Code:

[CentOS 7.6]
name=CentOS-7.6-x86_64
baseurl=http://vault.centos.org/7.6.1810/os/x86_64/
enabled=1
gpgcheck=1

[CentOS 7.6-updates]
name=CentOS-7.6-updates-x86_64
baseurl=http://vault.centos.org/7.6.1810/updates/x86_64/
enabled=1
gpgcheck=1


or better, create a new file: new_repo.repo with the information you suggested maintaining a back-up of the .repo files in the folder /etc/yum.repos.d/.
What I donīt understand is: when I add the new file new_repo.repo in the folder yum.repos.d, how does linux know that it has to take the new one instead of the older files??

luiscssz 04-02-2020 03:11 AM

Quote:

Originally Posted by ehartman (Post 6105873)
You can only update to the latest available 7.x version, as previous point updates are deleted from the servers when the next one gets released.
The 7.6 directory ON those servers now only contain a 'readme' file:

So when you use /7/ in your repo list you will get updated to the current latest 7.x release.

The current (and latest) release of CentOS 7 is 7.7.1908 (which means it is based on the 2019/08 sources from RHEL). But there probably will be a 7.8 one later this year.


actually this is not completely correct. In my case I have found the deprecated repositories (see my first thread) and could download the 7.6 release from the CERN repository (not only the readme) You are right that to find the deprecated repositories is quite difficult... but possible

ehartman 04-02-2020 03:35 AM

Quote:

Originally Posted by luiscssz (Post 6106923)
You are right that to find the deprecated repositories is quite difficult... but possible

And I deliberately didn't mention them as they are not being maintained anymore, so bugfixes and/or security problems will not be fixed IN them, they're a pure (and static) archive of old releases.
The 7.7 point update is just that: 7.6 with newer bugfixes and security updates (just as all 7.x updates are the 7 release with all - at that point - available fixes).

RHEL is very conservative with that, all 7.x releases should be the same, with only necessary updates applied, so a point update should never break existing software.
There are no version updates to kernel or supplied applications, unless really unavoidable (mozilla firefox/thunderbird is one as even the esr versions are only maintained for a year).

Lemassol 01-17-2023 03:31 PM

Hey there! I understand your frustration with trying to update your cluster from Centos 7.2 to 7.6. I've had a similar experience in the past. I would recommend trying the command "yum update --skip-broken" instead of just "yum update doc." This will only update packages that are not causing conflicts or errors.

TB0ne 01-17-2023 06:03 PM

Quote:

Originally Posted by Lemassol (Post 6405074)
Hey there! I understand your frustration with trying to update your cluster from Centos 7.2 to 7.6. I've had a similar experience in the past.

Oh? Since this is a two year old thread and you had the same issue, why don't you post your solution??

::EDIT:: And surprising no one, you came back to add your spam link...which has been reported, and will be deleted.


All times are GMT -5. The time now is 01:29 AM.