How can I "keep" yum'ed RPMs so I can setup a new FC10 pc WITHOUT internet access?
Hi all
I'm currently using FC6, but considering going to FC10. It seems that to do what I want, I'll -definitely- need to yum in quite a few packages once the basic FC10 is installed. (I want to put up the rpmfusion nvidia drivers for example, and get MP3 support among many other things). I. e. once my new FC10 install is running, I -must- have a working internet connection to get all the .rpms I need from repositories. HOWEVER If I want to setup an FC10 system in a remote location where I will NOT have internet access (i. e. no live "yummable" access to repositories) how will I do it?? A perfect solution seems to be if I can somehow get yum to "keep" all the .rpm's and dependant rpm's it downloads in a "non-live" directory somewhere... the idea being if I have to install my other FC10 boxes somewhere where I do not have internet access, I can burn these "kept" .rpm's to disc and simply start rpm -ivh'ing them once the base FC10 install is done... Is this possible? I'm not too worried about getting new updates etc. - I understand that doing it this way will "cut off" new systems from new versions of packages. What's critical for me is to be able to have a disc with some .rpm's with all dependencies fixed up (via yum) but NOT have to connect to repositories for each new FC10 system I set up - I want a "local" set of .rpm's with all solved dependencies already at hand. Can yum do this? Or is there some way to "defer" yum from "actioning" (for want of a better word) just-downloaded .rpm's? So I can keep them and burn them to disc with all their dependencies readily available? What would an rpm commandline look like that will behave "yum-like" in that it will install a package, and automatically first install all dependencies, given a directory with all the fully "yummed" .rpm's in it? |
Add your / where rpms already are to /etc/yum.repos.d,then run yum install somefile*.
|
Quote:
/home/myhome/yum_rpms to /etc/yum.repos.d and this will make yum put all downloaded .rpms into /home/myhome/yum_rpms? Or do you mean I need to do the above AFTER I have all the .rpms obtained by some other mechanism, that I otherwise would have had to pull through an internet connection? |
You want to have a look at the createrepo package. It allows you to create your own repo (local or otherwise).
Since it seems you run a machine for long periods without upgrading, you may want to consider Centos. Centos is RHEL with the logos removed. It is free to download/update and is binary compatible with RHEL. RHEL/Centos5 was based on FC6, so you would be very much at home with it. RHEL/Centos has a 5year support life as compared to Fedora's 13month support life. |
Quote:
|
Hi all
I took a look at createrepo, as well as, to whit http://dotancohen.com/howto/yum_repo.html However, this seems to imply that I'll need to download the entire update repository. Also, it does not address the fact that this will only work with a Fedora rsync'ed update site, while I specifically want to create a local repository of very specific non-Fedora stuff - i.e. to do non-Fedora work (play MP3's, codec rpm's etc) on newly installed FC10 systems that do not have internet connections. I just want a local copy kept of rpm files yum downloads during very specific packages' installation... so that later I can edit the yum config file as other posters have already explained to me, and have yum pull those SPECIFIC .rpm files from the local filesystem. I. e. some way to capture all the -specific- .rpm's yum downloads as it runs, keep them locally, and then later direct yum to them for the same update. Thanks! EDIT: I found this at http://www.phy.duke.edu/~rgb/General..._HOWTO-11.html Code:
# yum install package1 [package2 package3...] I. e. for subesquent installs, just copy this cache directory back from disc, then yum will be short-circuited to pull updates from its cache INSTEAD of the internet repositories?? Is this assumption correct? |
Quote:
|
You should check /etc/yum.conf to make sure that "keepcache=1" and not 0, otherwise you won't have any rpms in the cache.
|
billymayday response is a way to do it. The packages are then cached in folders under:
/var/cache/yum/ and the repository name. You can copy them from there to the other machines, but you will need to then know the dependencies and install those files too. I did that for a while while our Internet connection was too expensive, but that has changed and I am relieved. |
Quote:
|
The RPMs are cached and the dependencies are inside the RPMs but my understanding is that if you just copy the RPM files over to another machine you have to know which files are needed by which RPM to put them all on the same rpm command line statement. The rpm program will tell you what is missing. If your working with a small amount of files then this is manageable. My understanding is that the repo data XML connects the pieces for yum to use. Correct me if I'm wrong.
|
Hi guys thanks for all the respones.
Yes, that is my concern too - one of the reasons I tried to avoid RPM up to now was that I have always had immense problems with a certain .rpm requiring zillions of dependencies, then each of those dependant .rpm's has got its own, each of them have their own, etc. ad infinitum. I. e. the whole idea behind keeping the yum cache is exactly this - to avoid having to install all those dependant .rpm's by hand. Does the yum .rpm cache cache the concomitant yum .xml as well (which, as I gather, contains the dependancy information?) I. e. so I can just install a yum package from local storage, and have that package automatically install its depencies first, just as yum behaves when it pulls packages from an online repository? I guess this will be where createrepo will come in? |
Quote:
|
It won't include the xml, but install the "creeaterepo" package to generate it.
repomd.xml is like a package list for what's in the repo. The dependencies are listed in the rpm itself. I would assume that dependencies will be cached, and using yum rather than rpm to install a package will sort that issue. Haven't tried this though. |
Which is why I mentioned createrepo earlier in the thread.
When you install locally, look at using yum localinstall rather than using the rpm command. |
All times are GMT -5. The time now is 07:11 PM. |