LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Yum updates localinstall still requiring downloads - How can i disable this?? (https://www.linuxquestions.org/questions/linux-newbie-8/yum-updates-localinstall-still-requiring-downloads-how-can-i-disable-this-741834/)

xenner 07-21-2009 10:24 PM

Yum updates localinstall still requiring downloads - How can i disable this??
 
Hi,

Please exuse my noobness.

So, I have to patch several rehat boxes without the use of the net... For the most part.

We have 5 boxes, all with the same patches on them, which is none.
One box is on the net, and is our test machine. I will be getting the patches from here, then distributing them through a share to the other machines for them to update as required.

My problem is.... I did a 'yum update downloadonly' which is fine, but when I go to install the updates, I am prompted to download 876mb.

I have used multiple options with no success. I have searched for a considerable time to find a solution, but still no success.

What I am doing is;

yum localupdate skip-broken /usr/local/patches/

I also tried

yum localinstall /usr/local/patches/*

And disabling the repo via

yum localupdate disablereporhel* skip-broken /usr/local/patches/*


Obviously '/usr/local/patches/' is where all the .rpm's are at.

The response I get is;

Transaction Summary
=============================================================================
Install 8 Package(s)
Update 298 Package(s)
Remove 0 Package(s)

Total download size: 876 M
Is this ok [y/N]: n
Exiting on user Command
Complete!



Thanks for the assist.

lazlow 07-21-2009 11:16 PM

You cannot just point yum at a directory and have it update from there. You have to use the createrepo package to prep the directory and then you have to change your repo settings to point at your local repo.

xenner 07-21-2009 11:59 PM

Okay.

So, just to confirm from what I've just read somewhere about createrepo.

createrepo /usr/local/patches

And that will create a repo for the RPM's in the /usr/local/patches/repodata/ directory.

Then I vi the /etc/yum.repos.d/rhel-debuginfo.repo file to reflect the change;

ie.

name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=ftp://usr/local/patches/repodata/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release


THEN I simply run yum again???
Do I still use the localupdate switch??? Or just 'yum update'????

Thanks again.

lazlow 07-22-2009 12:29 AM

You also have to shut off all the other repos. You do this by setting enabled=0 (you have to change your local repo to enabled=1). If I remember correctly you have to reuse the createrepo package every time you add a new package to your local repo.

After that you just use yum (yum install whatever or yum update).

chrism01 07-22-2009 12:39 AM

Have you considered using the Redhat Proxy Server: http://www.redhat.com/docs/manuals/R...k/proxy/4.1.0/

xenner 07-22-2009 12:44 AM

Okay,

So at the moment in /etc/yum.repos.d/ I have have only one file, rhel-debuginfo.repo, which is what I edited to reflect the change of repo location. Previously it was set to;

baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/$basearch/Debuginfo/

Was I wrong to do this??? Or is there a new .repo file that was created somewhere else? As this file by default was previously set to "enabled=0".

Or should I be creating a completely new .repo file? Give it a completely random name, ending it in .repo, and placing it in to /etc/yum.repos.d/ as the previous one is?

Thanks again Lazlow.

And Chrism01...

I had considered that, but unfortunately, we can't do that just yet.. resources are restrictive. The box on the net isn't on there permenantly either.

lazlow 07-22-2009 01:35 AM

enabled=0 means that the repo in that section is shut off.

It really does not matter what the file is called as long as it is in that directory and ends in .repo .

xenner 07-22-2009 05:08 PM

Just another question.

Can you tell me why the original .repo file had 'enabled=0' in it instead of '1'??

There definitely isn't another .repo file anywhere is there???

Thanks again, I appreciate it.

lazlow 07-22-2009 05:15 PM

Because the repo file that you listed is the debug repo. Normally you only use this repo when you are having issues with a package, to debug it. Thus it was set shut off by defualt (enable = 0). Normally there are several .repo files located in that same directory (on a default install).

xenner 07-22-2009 05:55 PM

That is odd considering this is a fresh install without any configuration options changed and there is only one file in that directory, which is debuginfo.repo.

So, just to clarify, /etc/yum.repos.d/ directory is the ONLY place to have .repo files and I can place a brand new .repo in there which yum will look at and this will cancel out yum going to the internet. Providing that the new .repo file has the enabled=1 option??

Which means that I can simply do a 'yum update' on the box and it will do a local install from the location specified in the .repo file?

I can then transfer the copied repository to the share, and place the .repo file on the other servers pointing them to the share, then the updates should all go smoothly?

Thanks again.

karamarisan 07-22-2009 06:04 PM

Forgive the potentially very stupid answer, but I believe yum reports the 'download size' of the packages you are about to locally install. Have you tried just telling it 'y'? It will be immediately obvious whether it's actually downloading or not; unless your tubes are godly, there's no way it can actually download 876 M without giving you time to go get a sandwich, eat it, stop by the bathroom, and still come back in time to see the usual downloading text. If it goes straight to installing or shows 'Downloading...', etc. without any other text, you've got what you want.

xenner 07-22-2009 06:13 PM

Karamarisan,

I hadn't attempted that as I simply assumed that it would do as it suggested and download the files.

Our network is fairly incredible, and most likely our proxy has already cached the previously downloaded packages which it has a habit of doing for our 5000 or so users. :) So a re download would be considerably fast.

In my original post, I didn't paste all of the output, obviously. But after the 'yum localinstall etc...' a list of all the .rpm's was displayed, I'm assuming they were the ones I had previously downloaded, but I was then prompted with the 'download 876mb' option. Taking on your advice, I'll give that a shot as it will be easier in the future to do that.

Thanks.

lazlow 07-22-2009 06:33 PM

The repo info CAN also be put in your yum.conf but this is a non standard way to do things. If the debug repo is the ONLY file in the repo list on a fresh install, then somebody has tampered with the install disk.

karamarisan 07-22-2009 06:35 PM

Just double-checked this - in my version of yum, which is almost certainly later than yours, they've changed it to "Total size: xxx MB". So I'm pretty sure all you need to do is say yes. Let us know how this plays out.

Another thing to check out: I don't know how recently this was added to yum, but in my version, when you're installing a local package, the name of the file you're installing from is shown under 'Repository'.

xenner 07-22-2009 07:09 PM

Hi,

Thanks again for this assistance.

So.. I just ran yum update, after modifying the .repo files to reflect the 'enabled=1' option, and updated the location to be local. That began downloading the files from RedHat again, which isnot what I wanted.

I'm going to attempt the localinstall again, and select 'y' to download, see how that goes.


All times are GMT -5. The time now is 04:09 PM.