HOWTO proxy rpm using urpmi-proxy

Here you'll find a place for solutions and hints.

Please use one of the support subforums below for questions or if you have any issues and need support.

HOWTO proxy rpm using urpmi-proxy

Postby morgano » Jan 16th, '12, 01:01

( 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
Last edited by morgano on Feb 15th, '12, 15:45, edited 5 times in total.
Mandriva since 2006, then Mageia since 2011 at home & work. Thinkpad T43 & T400, Dell M4400, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 784
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: HOWTO proxy rpm using urpmi-proxy

Postby doktor5000 » Jan 16th, '12, 20:31

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?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 16661
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: HOWTO proxy rpm using urpmi-proxy

Postby morgano » Jan 16th, '12, 22:35

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...
Mandriva since 2006, then Mageia since 2011 at home & work. Thinkpad T43 & T400, Dell M4400, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 784
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden


Return to The magician suggests...

Who is online

Users browsing this forum: No registered users and 0 guests