Maarten Vanraes have made a wonderful solution that make me save bandwidth, and install and upgrade families computers more quickly.
We soon have 6 mga1 machines, and a slow wireless internet connection...
So on our file server i have installed a rpm proxy.
It is transparent, and fetches files only when requested by some client, and then keep it so it do not fetch it again for other clients.
For me the solution below just works
INSTALL
Currently there is a rpm only for cauldron i586.
So if you run that system then just install that and jump to START part below.
If you use other system, here is the method for making the rpm:
Fetch urpmi-proxy-0.2.4-3.mga2.src.rpm ( ! see if there is a later version ! )
example: ftp://ftp.acc.umu.se/mirror/mageia/dist ... a2.src.rpm
Make a rpm for your system, and install it:
- Code: Select all
# urpmi rpm-build
# urpmi --buildrequires urpmi-proxy-0.2.4-3.mga2.src.rpm
# rpmbuild --rebuild urpmi-proxy-0.2.4-3.mga2.src.rpm
# urpmi ~/rpmbuild/RPMS/noarch/urpmi-proxy-0.2.4-3.mga1.noarch.rpm
START / RESTART
It is a web application running under apache, which it installs as a dependency ( I choosed first alternative it presented )
- Code: Select all
/etc/init.d/httpd restart
CONFIGURE
In /etc/urpmi-proxy.conf I edited sources section to:
- Code: Select all
$sources = [
'http://ftp.acc.umu.se/mirror/mageia'
];
UPDATE: http is preferred. I had large files not getting cached using ftp, https://bugs.mageia.org/show_bug.cgi?id=4440 /UPDATE
Author recommends not to use mirrorlist, urpmi, and not more than one source "yet".
USE
On all client machines, - including the server!:
- Code: Select all
# urpmi.removemedia -a
# urpmi.addmedia --distrib http://my.local.server.IP/mageia/distrib/1/x86_64
Note: not all system need be the same type; you can have some mga1 i586, other cauldron x86_64...
TIPS
If you get "curl exited with 28" you need to open ports, or shut down the firewall.
More info: read /etc/urpmi-proxy.conf
Read: https://wiki.mageia.org/en/Urpmi-proxy (Now i note it have improved since i tried it and wrote the above for myself first)
Log: /var/log/urpmi-proxy.log
Debug: set $debug = 1; in urpmi-proxy.conf, and see output in /var/log/httpd/error_log