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.
Add the following lines to /etc/yum.conf inside the [main] section:
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.
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.
|All times are GMT -5. The time now is 12:58 PM.|