LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-21-2009, 10:24 PM   #1
xenner
Member
 
Registered: Jul 2009
Location: Brisbane
Distribution: RHEL 6.5
Posts: 39

Rep: Reputation: 0
Exclamation 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.
 
Old 07-21-2009, 11:16 PM   #2
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
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.
 
Old 07-21-2009, 11:59 PM   #3
xenner
Member
 
Registered: Jul 2009
Location: Brisbane
Distribution: RHEL 6.5
Posts: 39

Original Poster
Rep: Reputation: 0
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.

Last edited by xenner; 07-22-2009 at 12:01 AM. Reason: Wrong location.
 
Old 07-22-2009, 12:29 AM   #4
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
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).
 
Old 07-22-2009, 12:39 AM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Have you considered using the Redhat Proxy Server: http://www.redhat.com/docs/manuals/R...k/proxy/4.1.0/
 
Old 07-22-2009, 12:44 AM   #6
xenner
Member
 
Registered: Jul 2009
Location: Brisbane
Distribution: RHEL 6.5
Posts: 39

Original Poster
Rep: Reputation: 0
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.

Last edited by xenner; 07-22-2009 at 12:51 AM.
 
Old 07-22-2009, 01:35 AM   #7
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
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 .
 
Old 07-22-2009, 05:08 PM   #8
xenner
Member
 
Registered: Jul 2009
Location: Brisbane
Distribution: RHEL 6.5
Posts: 39

Original Poster
Rep: Reputation: 0
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.
 
Old 07-22-2009, 05:15 PM   #9
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
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).
 
Old 07-22-2009, 05:55 PM   #10
xenner
Member
 
Registered: Jul 2009
Location: Brisbane
Distribution: RHEL 6.5
Posts: 39

Original Poster
Rep: Reputation: 0
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.
 
Old 07-22-2009, 06:04 PM   #11
karamarisan
Member
 
Registered: Jul 2009
Location: Illinois, US
Distribution: Fedora 11
Posts: 374

Rep: Reputation: 55
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.
 
Old 07-22-2009, 06:13 PM   #12
xenner
Member
 
Registered: Jul 2009
Location: Brisbane
Distribution: RHEL 6.5
Posts: 39

Original Poster
Rep: Reputation: 0
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.
 
Old 07-22-2009, 06:33 PM   #13
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
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.
 
Old 07-22-2009, 06:35 PM   #14
karamarisan
Member
 
Registered: Jul 2009
Location: Illinois, US
Distribution: Fedora 11
Posts: 374

Rep: Reputation: 55
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'.
 
Old 07-22-2009, 07:09 PM   #15
xenner
Member
 
Registered: Jul 2009
Location: Brisbane
Distribution: RHEL 6.5
Posts: 39

Original Poster
Rep: Reputation: 0
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.
 
  


Reply

Tags
update, yum



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SLOW downloads/updates ifconfig has large overruns TheWabbit Linux - Networking 3 06-21-2009 11:53 PM
got a Fedora 9 indication that yum updates were available, but there were no updates landonmkelsey Linux - Software 12 02-08-2009 09:53 AM
Count yum downloads jakev383 Linux - Server 2 11-23-2007 05:56 PM
SMART - Disable simultaneous downloads? shame Linux - Software 3 01-05-2007 02:26 PM
yum check-update says no updates when there are updates? MarkEHansen Linux - General 7 12-29-2006 05:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration