[SOLVED] How to get CentOS 5 (no laughing) repo configured and working

A 5 star hangout for overworked and underpaid system admins.
Post Reply
spkay31
Posts: 6
Joined: 2016/09/28 17:43:39

[SOLVED] How to get CentOS 5 (no laughing) repo configured and working

Post by spkay31 » 2021/07/19 17:52:52

OK,

I am a software support professional and I have done everything I can to encourage this large enterprise customer to move this application off of RHEL 5.11 and up to 7 or 8. But in the meantime I would still like try and reproduce a problem they have reported with the software I support. I think it is environmental but I would like to try and get CentOS 5.11 setup in a VM (already done) and configure the repo so I can at least connect to the CentOS 5.11 archive repos and get things to the point where I can compile C++ code with the same version of gcc (stock 5.11 release) and build and debug some code. Since I am familiar with RHEL/CentOS 6 and upward I have never had to deal with manually configuring a repo to point to an archive or vault location. I have tried setting the following in the "baseurl" vars [base/updates/extras/centosplus/contrib] in CentOS-Base.repo in /etc/yum.redo.d but this doesn't work.

baseurl=http://archive.kernel.org/centos-vault/ ... /$basearch

I have the full CentOS-5.11 iso's 1 and 2 and also was trying to simply use the iso as a repo but after trying the command:

yum --enablerepo=c5-media install createrepo (or other rpm)

I just get an error message

Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http/[s/] or file.
Eg. Invalid release/repo/arch combination

----
Oops - looks like typing this email I answered part of my own question. I was expecting the $releasever was set properly to "5.11" but I can see in the error message it is set to '5'. I overrode the variable $releasever and just entered the literal string '5.11' and now I am able to connect to a repo and get some updates. I'll see if this is working good enough to get what I need install.

Still concerned as to why I can't seem to use the "--enablerepo=c5-media" when the media is mounted and accessible in /media/CentOS_5.11_Final.

Any help greatly appreciated!

Cheers,
-Scott

spkay31
Posts: 6
Joined: 2016/09/28 17:43:39

Re: How to get CentOS 5 (no laughing) repo configured and working

Post by spkay31 » 2021/07/20 15:11:27

I was eventually able to get the repo configured once I fixed the $releasever = 5 vs 5.11 problem. I pointed it to

baseurl=http://archive.kernel.org/centos-vault/ ... /$basearch

Not sure why the config does have $releasever = 5.11 instead of 5, but manually overriding in the config files did the trick. I was also successful in getting the VMWare Tools installed once I realized the "modutils" commands are in the /sbin directory which is not in the standard user acct path by default. At least now things are working and I can definitively tell my customer I do not see the problem they are reporting with our software in the same exact Linux release they are using.

Cheers,
-Scott

scottro
Forum Moderator
Posts: 2556
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Re: How to get CentOS 5 (no laughing) repo configured and working

Post by scottro » 2021/07/20 17:38:05

Well, though it's completely EOL, thanks for coming back and giving the solution. For posterity, I'll mark this solved.

Another Scott
New users should check the FAQ and Read Me First pages

Post Reply