Link to home
Start Free TrialLog in
Avatar of davesnb
davesnbFlag for Canada

asked on

Yum Local repo question

Hello Ee,

I created a local repo for a CentOS 7.6 isolated instance with no internet, and copied a bunch of rpm files over from media to local directory . I created the proper repo file in /etc/yum.repos.d and pointed to the proper directory for the rpms, ran the createrepo ok . Question is , if I wish to add more rpms or delete rpms , how do I update/sync to show the newer packages and package count ? I tried 'yum clean all ' , no luck .
Avatar of David Favor
David Favor
Flag of United States of America image

Local repos are meant to pull from a real repos.

https://wiki.centos.org/HowTos/CreateLocalRepos provides details for how to manage repos.

If you're trying to do this disconnected from the net, you'll likely have to dig into the normal management process + hack up the procedure, also likely you'll have to modify the yum python script also, as the entire local repo system is built around pulling from other repos via net connections.

Without a net connection, you'll have to rewrite everything connected to the net.

Then you'll have to likely hand edit all repo file lists to match whatever set of .rpm files you're somehow moving onto your machine.

So in essence, you'll likely have to build your own repo management system.

Much easier will be to just install sets of .rpm files you know are required for some update.
Avatar of davesnb

ASKER

Thank you for the feedback . I am using the --downloadonly option so it appears to download all dependencies as well, would this not accomplish what I intend to do ? For example, if I "yum install  --downloadonly --downloaddir=/usbmedia docker" it should grab all docker rpm files and rpm dependencies and save them to usb , which could then be transported to the isolated system for install . Also , can you answer the question related to refreshing the package count ?
ASKER CERTIFIED SOLUTION
Avatar of davesnb
davesnb
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial