On Monday, 29 April 2019 22:50:18 BST [email protected] wrote: > But that seems strange - why would I need both GENTOO_MIRRORS and > http_proxy? > > GENTOO_MIRRORS="http://myserver" > http_proxy="http://myserver:3142 > > Does the http_proxy imply that I'd need a proxy app, like squid. Between my > client and server, there won't be any appreciable traffic.
I think there are two different concepts here, which have been conflated. You do not need a proxy server, unless you intend to set up a caching server. There are two configurations you could set up in your home network, depending what functionality you intend to achieve: 1. Local portage and local distfiles servers. You can set up an rsync server for portage's files and a web or ftp server for distfiles. This works well with identical systems. When your local server uses the same packages as your clients the corresponding distfiles will only be downloaded once from the Gentoo source mirrors to the local server and all clients will fetch them via web or ftp within your LAN, as and when they need them. However, when some of your clients have different packages installed, or in any case different than the local server, then each client will need to download such source files from the Internet. Say you have a server with no Gnome packages, but 10 out of 30 client PCs run a Gnome desktop. Then each and every of these 10 clients will try to fetch the Gnome distfiles from the local server, get a 404 and then try the next server you have specified for GENTOO_MIRRORS in their /etc/portage/make.conf. This way you end up downloading large source files multiple times, which defeats the purpose of running a local mirror. So, this set up works best for few LAN clients which have mostly the same packages installed as the local Gentoo server and quickly becomes suboptimal as the number of different packages x clients increases. A variation on the above is using rsync to duplicate the distfiles directory between server and client, or NFS/CIFS to share the same folder across PCs. 2. Local portage and local caching distfiles servers. In this configuration the portage files are served over rsync as above. The distfiles however are served via a caching proxy server. Using the previous example, when some clients want to install different packages they will always go via the local http_proxy server. If the server has cached said packages it will serve these to the requesting clients immediately. Otherwise, the server will fetch the missing packages from the Gentoo mirrors once only, cache them locally and then serve these to whichever client requested them. There are many different web servers you could use to serve distfiles. I have used boa for many years because the server machine did not have a web/ftp server already installed and the boa web server is exceedingly fast with a very small footprint. However, if you already have apache running, then it would make sense you use that. There are also many proxy caching servers you could choose. Squid has already been mentioned, net-misc/apt-cacher-ng is also mentioned in the wiki pages. HTH. -- Regards, Mick
signature.asc
Description: This is a digitally signed message part.

