Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Tip

You can use your new caching server to install systems faster as well. This is handy if you maintain a lot of systems, or test installations a lot. To use the proxy, edit /etc/yum.conf and add the setting proxy=http://your-squid-server:3128 to the [main] section. Then comment out .

Next you'll want to edit as many of the repository files as you can to use a fixed location for downloading. To do this, comment out the lines starting with mirrorlist= and uncomment out lines #baseurl. To automate editing of repos files to use base urls instead or mirror lists, this command should work.
sed -i -e 's/^mirrorlist/#mirrorlist/g' -e 's/^#baseurl/baseurl/g' /etc/yum.repos.d/*.repo

The reason you should use baseurls is so that you are consistently going to the same source for files and squid proxy will know to cache.
There is one issue, you must pick a mirror site that uses cache headers so squid knows caching is valid.