Page 1 of 1

HOWTO proxy rpm using urpmi-proxy

PostPosted: Jan 16th, '12, 01:01
by morgano
( Summary from discussion on mailing list mageia-discuss@mageia.org )

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'
 ];
Exchange the URL for your preferred mirror.
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
Of course exchange my.local.server.IP as appropriate, and the rest as per what system you use.
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

Re: HOWTO proxy rpm using urpmi-proxy

PostPosted: Jan 16th, '12, 20:31
by doktor5000
Two thumbs up! Would you mind to compare this with https://wiki.mageia.org/en/Urpmi-proxy and extend that wiki page with this information, please?

Re: HOWTO proxy rpm using urpmi-proxy

PostPosted: Jan 16th, '12, 22:35
by morgano
Thank you.
Well that wiki page have sure improved since i read it, so i add link to it above.
I think my post can be a good hands-on, and then use wiki as reference.
But yes it could use the "make your own rpm" part until rpm variants are avaiable...

Re: HOWTO proxy rpm using urpmi-proxy

PostPosted: Dec 23rd, '21, 14:00
by squidf
Hi
I just updated the wiki to emphasize to pay attention to the cache and tmp folder owner, in case the default ones are not used; it should be apache:apache.
Might sound obvious when you are used to work with apache but it might not be the case for everyone; at least, it was not straightforward for me! :P

Additional question: is it now possible to use two http repositories in the /etc/urpmi-proxy.conf? It doesn't work for me. One or the other works. If it should be possible, I will open a new post to get support. If not, I'll let it go for the time being.

Thanks!

Re: HOWTO proxy rpm using urpmi-proxy

PostPosted: Dec 23rd, '21, 19:13
by doktor5000
squidf wrote:Additional question: is it now possible to use two http repositories in the /etc/urpmi-proxy.conf? It doesn't work for me. One or the other works. If it should be possible, I will open a new post to get support. If not, I'll let it go for the time being.

You're probably better of asking either Maarten directly or ask on the dev or discuss mailinglists.