LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 06-05-2011, 01:48 PM   #1
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 2,127

Rep: Reputation: 174Reputation: 174
How to save downloaded packages CentOS software updater?


The subject line describes what I want to do. When I run the software updater in CentOS 5.6 it download, installs and then deletes the necessary packages. I would like to save the downloaded packages so I can copy them to another machine and save the download bandwidth. I know how to do this in Ubuntu by changing the Synaptic preferences. I have not found anything similar in CentOS. My searches have not found the answer either.

TIA,

Ken
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 06-05-2011, 02:05 PM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Add the following lines to /etc/yum.conf inside the [main] section:
Code:
cachedir=/var/cache/yum
keepcache=1
and the trick is done. You will find the downloaded packages under /var/cache/yum into subdirs matching the names of the yum repositories.
 
2 members found this post helpful.
Old 06-05-2011, 02:09 PM   #3
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Hi there,

If I am not wrong when you run the yum updater it download the packages in /var/cache/yum , they should not get deleted until you run yum clean all. Next time you run yum updater check your /var/cache/yum directory and see if you have the downloaded package.

Here are the steps that you can follow to make a central server for yum repo:

1. Select one server to act as primary server (make sure that you use the same architecture on the other machine say 32 bit or 64 bit otherwise it will be of now use).
2. Run yum clean all, this will clear up the yum cache.
3. Run yum update or yum install and check if you see the package/packages under /var/cache/yum
4. If you do see packages then copy over the packages to some other location say /var/www/html/yum-packs
5. Run createrepo on the above location: createrepo /var/www/html/yum-packs
6. Then configure other system to use this system for yum updates.

I hope this helps.
 
2 members found this post helpful.
Old 06-05-2011, 02:40 PM   #4
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 2,127

Original Poster
Rep: Reputation: 174Reputation: 174
Thanks folks for the quick replies!!! The packages are in deed to be found in /var/cache/yum/updates/packages. However, at the end of the update process they disappear. I edited the value of keepcache= in /etc/yum.conf and that did the trick.

I do not really need my own yum repo server. At most I may have a virtual machine and a physical machine running the same version. I can try things on the VM and if they work I may apply them to the physical machine. I simply copy the RPMs to the applicable yum/... directory then run the software updater or yum install and it finds the RMPs and does not bother to download them again.

Thanks again!

Ken
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Where do I save downloaded packages from SlackBuilds? Robert.Thompson Slackware 9 01-13-2011 11:51 AM
Does software updater keeps downloaded Packages in the cache? Leon_Amirreza Fedora 1 08-14-2007 01:00 PM
[centos] yum and software updater pcandpc Linux - Distributions 1 04-26-2007 06:44 PM
apt-get : save the "downloaded" packages? sagar.1986 Ubuntu 1 01-20-2007 02:07 AM
Suse 9.1 upgrading to pro by yast; how to save downloaded packages? oryan_dunn Linux - General 7 09-12-2004 12:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 12:35 AM.

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