Yum – How to Update Yum Offline

fedorayum

I've been looking around for a way to update an offline fedora box but haven't found anything. I only have a Windows computer connected to the Internet. I noticed that my yum config is pointed to http://download.fedoraproject.org/pub/fedora/linux/updates/14/i386. Is there a way I can download a list of packages and then those packages manually but still use yum?

I've seen ways to do this with a second linux box that has Internet access, but I don't have that.

Best Answer

  1. Go to http://mirrors.fedoraproject.org/publiclist/Fedora/14/ and choose a mirror near you.

  2. Go to updates/14/i386/ and download everything using your favourite download manager/tool.

  3. Copy everything to some media (e.g. USB key) and from that key to your Fedora 14 machine. For example you can make a /var/lib/yum/repo/F14_updates directory on your box.

  4. Run createrepo /path/to/your/downloaded/rpms.

  5. Add new repository description in /etc/yum.repos.d. Use some existing file as a template. The only change is the path: instead of http://... use file:///path/to/your/downloaded/rpms. Make sure to enable the repository.

  6. Disable all other repositories -- you don't have access to them anyhow, so they won't help you.

  7. Run yum update and enjoy your freshly updated system.

Related Question