LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 01-07-2009, 08:15 AM   #1
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,518

Rep: Reputation: 100Reputation: 100
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?
 
Old 01-07-2009, 08:47 AM   #2
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
Add your / where rpms already are to /etc/yum.repos.d,then run yum install somefile*.
 
Old 01-07-2009, 12:46 PM   #3
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,518

Original Poster
Rep: Reputation: 100Reputation: 100
Quote:
Originally Posted by alan_ri View Post
Add your / where rpms already are to /etc/yum.repos.d,then run yum install somefile*.
Thanks! If I understand you correctly, I need to just add, for example

/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?
 
Old 01-07-2009, 12:58 PM   #4
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
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.
 
Old 01-07-2009, 01:18 PM   #5
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
Quote:
Originally Posted by rylan76 View Post
Thanks! If I understand you correctly, I need to just add, for example

/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?
No,no,no,you got to understand that rpms are on the one machine and you want to install them on the other.I was thinking that you have a LAN with 2 machines and you want to install some packages from one to the other without internet connection,if so,you can do that but you can't put the path /home/something,it has to be a full path to the other machine;for example; ftp://192.168.1.2/ where the / is your entire root directory,because that's the best way to do it,since it would be very hard for you to look where are all the files you need,it's better if yum do it.If you can't do it that way then CD is an answer,first copy all the files you want to it and then mount it on the machine you want and add it as a repo to your /etc/yum.repos.d and then just install any package you want with the command I've told you before and in that command * is very important because it will install all the dependencies that a program requiers.

Last edited by alan_ri; 01-07-2009 at 01:21 PM.
 
Old 01-08-2009, 12:31 AM   #6
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,518

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

Yum checks to see if package1 is already installed and is the latest version. If not, it downloads package1 {\em and all its dependency packages} (saving them in its cache directory) and installs them. Additional packages can be listed on the same command line. The packages can be specified with standard filesystem globs. Some examples:
I. e. if I just simply write this cache directory to a CD / DVD, I'll be sitting pretty?

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?

Last edited by rylan76; 01-08-2009 at 12:53 AM.
 
Old 01-08-2009, 05:38 AM   #7
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
Quote:
Originally Posted by rylan76 View Post
Is this assumption correct?
It is.
 
Old 01-08-2009, 06:30 AM   #8
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
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.
 
Old 01-08-2009, 07:07 PM   #9
dannybpng
Member
 
Registered: Sep 2003
Location: USA
Distribution: Fedora 27
Posts: 73

Rep: Reputation: 19
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.
 
Old 01-08-2009, 10:01 PM   #10
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Quote:
Originally Posted by dannybpng View Post
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.
Don't the dependencies get cached as well if they are installed by yum?
 
Old 01-09-2009, 01:44 AM   #11
dannybpng
Member
 
Registered: Sep 2003
Location: USA
Distribution: Fedora 27
Posts: 73

Rep: Reputation: 19
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.
 
Old 01-09-2009, 06:44 AM   #12
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,518

Original Poster
Rep: Reputation: 100Reputation: 100
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?
 
Old 01-09-2009, 06:46 AM   #13
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,518

Original Poster
Rep: Reputation: 100Reputation: 100
Quote:
Originally Posted by dannybpng View Post
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.
Hmm - but if I copy the -entire- yum cache directory, won't this include the needed XML too? Instead of just the .RPMs in the cache folder, copy the whole shebang to DVD or whatever, then later copy it back and presto, a local, offline repository?
 
Old 01-09-2009, 01:36 PM   #14
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
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.
 
Old 01-09-2009, 02:31 PM   #15
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
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.
 
  


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
Can "sort of" access the internet using Firefox & Suse 10.0 ejr Linux - General 3 12-27-2005 10:02 PM
Getting message "connect: Network is unreachable" trying to access the Internet denver1980 Linux - Networking 5 12-29-2004 05:22 PM
Is there any way to access the "setup" menu after installation? neocookie Slackware 3 09-24-2004 03:30 AM
"X-MS" cant open because "x-Multimedia System" cant access files at "smb&qu ponchy5 Linux - Networking 0 03-29-2004 11:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 05:19 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration