Caching DNF updates

For the past couple of years, I've been running Fedora. I'm not a distro-crusader, so take this for what it's worth.

I recently moved out of San Francisco and into the forest. (more on that later!) One of the side effects of such a move is that internet service is back onto copper lines and analog repeaters. But given that rent is half the cost of San Francisco and I get to live right near all those fantastic organic farms, surrounded by redwoods, I'll take it.

I have lots of little machines always fighting for DNF header updates, delta rpms, and worse, firefox/libreoffice/kernel updates. So I decided to kick it old school and setup a squid caching proxy.

Basically, somewhere on your home network do the following:

# 10 GB of cache. Make sure you have that much space or change it.
cache_dir ufs /var/spool/squid 10000 16 256

# Allow a single object to be cached up to 500MB.
# I actually run this larger so I cache ISOs occasionally.
maximum_object_size 500 MB
proxy=http://proxy-ip:3128/
baseurl=http://fedora.osuosl.org/linux/releases/$releasever/Everything/$basearch/os/

The first update for me is still going to be rather slow, but then all the followup updates are nice and snappy.

Personally, this just furthers my desire for a distro that does peer-to-peer updates on local network segments. But that is a story for another day.

-- Christian Hergert 2015-07-29

Back to Index