LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Getting all RPMs needed by 'yum install pkg1 pkg2 pkg3' to install on offline system (http://www.linuxquestions.org/questions/linux-newbie-8/getting-all-rpms-needed-by-%27yum-install-pkg1-pkg2-pkg3%27-to-install-on-offline-system-885895/)

veeruk101 06-12-2011 09:07 AM

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.

smoker 06-12-2011 09:30 AM

Use the original install dvd /CDs and use a local repo.

http://www.centos.org/modules/newbb/...forumpost45421

veeruk101 06-12-2011 09:53 AM

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.

smoker 06-12-2011 10:20 AM

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.

16pide 06-12-2011 10:36 AM

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

veeruk101 06-12-2011 10:44 AM

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.)

scottro11 06-12-2011 10:44 AM

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

John VV 06-12-2011 02:33 PM

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 ..

16pide 06-13-2011 02:46 AM

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

veeruk101 06-13-2011 12:00 PM

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.)

16pide 06-14-2011 02:51 AM

Quote:

Originally Posted by veeruk101 (Post 4384298)
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).


All times are GMT -5. The time now is 06:38 PM.