LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 06-12-2011, 08:07 AM   #1
veeruk101
Member
 
Registered: Mar 2005
Distribution: Ubuntu 12.04 LTS
Posts: 249

Rep: Reputation: 16
Getting all RPMs needed by 'yum install pkg1 pkg2 pkg3' to install on offline system


I need to somehow do a yum installation (or equivalent of) on a system that is offline with no access to the internet. (I do have access to another Linux system that has internet access, but the Linux installations on both systems have different packages installed and enabled.)

Let's say the command to enter is 'yum install pkg1 pkg2 pkg3' (the documentation for some applications I need indicate the installation instructions this way, and not as the actual RPMs I need). Is there a way for me to run that on my offline system?

e.g. one way I can think of is to run that command on the online system, somehow if possible take note of what RPMs get installed, then transfer them to the offline system via USB and install all the RPMs via rpm command.

The problem with my above idea is that the two systems have different packages enabled, so even if yum on the online system shows a few dependencies being downloaded, I could run download and install all these RPMs and their dependencies on the offline system only to find several more missing dependencies, and dependencies of those dependencies.

Is there an elegant way to approach this situation that won't drive me insane? Thanks.

Last edited by veeruk101; 06-12-2011 at 08:08 AM.
 
Old 06-12-2011, 08:30 AM   #2
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 248Reputation: 248Reputation: 248
Use the original install dvd /CDs and use a local repo.

http://www.centos.org/modules/newbb/...forumpost45421
 
0 members found this post helpful.
Old 06-12-2011, 08:53 AM   #3
veeruk101
Member
 
Registered: Mar 2005
Distribution: Ubuntu 12.04 LTS
Posts: 249

Original Poster
Rep: Reputation: 16
How would I know exactly which RPMs to place into a local yum repository?

Or are you assuming all the RPMs I'll need are from the installation CD? When I'd like to run 'yum install pkg1 pkg2 pkg3', those packages and their dependencies can be from any number of external repositories not necessarily included in the Linux installation CD.
 
Old 06-12-2011, 09:20 AM   #4
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 248Reputation: 248Reputation: 248
If you mean to answer my suggestion with faults in my logic which I can not predict due to the lack of information provided, then we could be here all day.

A manual rpm install and manual dependency resolution is your only course it seems.
 
0 members found this post helpful.
Old 06-12-2011, 09:36 AM   #5
16pide
Member
 
Registered: Jan 2010
Posts: 418

Rep: Reputation: 83
If your 2 systems are in the same room, the easiest is to use the networked one as a router for the second.
This is easily done if the networked machine has for example both wifi and ethernet, and the other one only has ethernet OR wifi.
Of course, this could violate your network policies and security, so ...

Like Smoker said, we need more background data before we can help you
 
Old 06-12-2011, 09:44 AM   #6
veeruk101
Member
 
Registered: Mar 2005
Distribution: Ubuntu 12.04 LTS
Posts: 249

Original Poster
Rep: Reputation: 16
The 2 systems aren't in the same room unfortunately.

I'm interested in learning more about how I could make it work with manual rpm dependency resolution. When resolving the dependencies, the dependencies will all have dependencies and so on leading to a huge number of packages. Is there any way I could figure out where the dependency resolution would need to stop so as to work on the offline system? (Not too sure how to approach this.)
 
Old 06-12-2011, 09:44 AM   #7
scottro11
Member
 
Registered: Jun 2009
Location: NYC
Posts: 257

Rep: Reputation: 58
If you just need to download the packages on one machine, and the two machines are running the same version, you can use yum-downloadonly

http://www.cyberciti.biz/faq/yum-downloadonly-plugin/

If you want to use your DVD or CD as install media, you can make a yum.repo

http://blogs.oracle.com/murlee/entry..._with_native_x
 
Old 06-12-2011, 01:33 PM   #8
John VV
Guru
 
Registered: Aug 2005
Posts: 12,902

Rep: Reputation: 1713Reputation: 1713Reputation: 1713Reputation: 1713Reputation: 1713Reputation: 1713Reputation: 1713Reputation: 1713Reputation: 1713Reputation: 1713Reputation: 1713
if the machine that is "online" is a cloned copy of the "offline" computer then the "yum-downloadonly" plugin is just fine

Quote:
The problem with my above idea is that the two systems have different packages enabled
? packages or repos
the current -- what os is this
suse11.2,.3,.4 ?
rhel 4,5,or 6
cent 4,or 5
SL4,5,or 6

and what version of the major version

the tow DO need to be the same major and minor version of the unknown OS


normally installing software offline is a week to 10 days affair
of back and forth to the online box to get a missing dependency
then getting a "missing dependency" for a "missing dependency"... and so on

connecting the "offline" computer to the net - is advisable ..

Last edited by John VV; 06-12-2011 at 01:37 PM.
 
1 members found this post helpful.
Old 06-13-2011, 01:46 AM   #9
16pide
Member
 
Registered: Jan 2010
Posts: 418

Rep: Reputation: 83
Several people have suggested you do a local yum repository.
Someone even posted the url for the method to do it.
It is the very quick and elegant solution to your problem.
Please do it and tell us how it went.
I assume that you have or can download the install dvd matching your install.
In it there is a directory filled with rpms.
Just follow the instruction to make it a local repository.
If you also want updates, you can mirror the centos update repository, and make this an additional repository. But this is something you can do as a second step
 
Old 06-13-2011, 11:00 AM   #10
veeruk101
Member
 
Registered: Mar 2005
Distribution: Ubuntu 12.04 LTS
Posts: 249

Original Poster
Rep: Reputation: 16
Regarding the local repository idea, even though it doesn't include the external packages I'll need I'll give it a shot.

Which yum repositories is the CentOS install DVD's RPMs folder equivalent to?

Also, would anyone happen to know which of the 7 install CDs that RPMs folder would be available in? (As I'm not using the install DVD.)
 
Old 06-14-2011, 01:51 AM   #11
16pide
Member
 
Registered: Jan 2010
Posts: 418

Rep: Reputation: 83
Quote:
Originally Posted by veeruk101 View Post
Which yum repositories is the CentOS install DVD's RPMs folder equivalent to?
Also, would anyone happen to know which of the 7 install CDs that RPMs folder would be available in? (As I'm not using the install DVD.)
Install dvd is equivalent to the base repository (as opposed to updates).
the repository rpms are spread across all install cds. I think you just put all the .rpm files in a directory, and then follow the "local repository howto".

I've personally used a dvd for this (on Fedora), and it's simpler since the repository can stay on the dvd (/media/my-dvd/xxx being the repository I configure).
 
  


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
yum install flash ... yum: command not found ... which yum ... /usr/bin/yum tg3793 Fedora 8 04-13-2011 11:25 AM
where yum saves downloaded packages . how can i install all of these on other system amolgupta Linux - Software 3 11-22-2007 06:54 AM
Install Patches on Offline System g0ld2k Red Hat 2 10-21-2007 02:11 PM
cannot install rpms, use apt-get/yum/up2date pafinator11 Linux - General 1 07-27-2005 10:40 AM
using yum to install rpms - how? dingo_aus Linux - Software 9 07-01-2004 08:50 PM


All times are GMT -5. The time now is 05:23 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration