You are not logged in.

#1 2006-07-18 15:45:45

SystemParadox
Member
From: Tavistock (Devon) and Bristol
Registered: 2006-06-09
Posts: 35
Website

Proxy for pacman- download packages once for all machines

Hello.
I have a network with several machines and a server, all running Arch.
The server is also the internet gateway.

At the moment, all machines download all the packages they need independantly of each other, so many packages are downloaded several times. I could have one machine update all packages and then run a feed from /var/lib/pacman for all the others to update from, but then I must somehow make sure that all needed packages are on that machine. If I get another machine to install a new package it will either- not find it, or download it from the net and store it locally. Then any other machine that wants it will again be downloading it's own copy.

What pacman needs is some sort of proxy server. I run this on my server. Then on all other machines pacman is set to use that proxy. Whenever another machine requests a package or package list, the proxy downloads it and stores it on my server, then lets the client know that it's available from my servers feed.

Maybe there is already something like this?

Thanks in advance
Simon

Offline

#2 2006-07-18 16:28:26

soloport
Member
Registered: 2005-03-01
Posts: 442

Re: Proxy for pacman- download packages once for all machines

This may help.  Although it represents upwards of 3.5GB, I wouldn't consider it overkill.  Unless each and every server / workstation on your LAN is absolutely identical, a pacman proxy would be tricky.

Example: When you add DE (e.g. Gnome, KDE) apps to your workstations would you also add them to your server?  (Most admins would consider this "bad form".)  wink

Offline

#3 2006-07-18 18:29:18

Romashka
Forum Fellow
Registered: 2005-12-07
Posts: 1,054

Re: Proxy for pacman- download packages once for all machines

Local Mirror HOWTO on Wiki is an overkill. All you need is any network filesystem. I use fuse-based sshfs. There is also shfs kernel module but it was much less stable last time I tried.

Just mount /var/cache/pacman/pkg on your client machines to /var/cache/pacman/pkg on your server. Then you'll have shared package cache. It is so simple!
You can even mount /var/lib/pacman/{current,extra,testing,community,unstable} the same way. Then you can do pacman -Sy only once.

Note that you need to patch your initscripts if you want to mount right from fstab on boot. See bug report #4681 (I'm not sure if I updated it for the latest initscripts release). I hope this will be included soon.

PS: if I'll have more time I'll write a little howto on wiki.


to live is to die

Offline

#4 2006-07-18 18:58:21

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: Proxy for pacman- download packages once for all machines

Squid - A full-featured Web proxy cache server.
Maybe this is what you've been looking for ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2006-07-19 14:48:34

Romashka
Forum Fellow
Registered: 2005-12-07
Posts: 1,054

Re: Proxy for pacman- download packages once for all machines

As I said, I've started new howto:
http://wiki.archlinux.org/index.php/How … r_approach


to live is to die

Offline

#6 2006-07-19 14:59:32

soloport
Member
Registered: 2005-03-01
Posts: 442

Re: Proxy for pacman- download packages once for all machines

.

Romashka wrote:

That's brilliant!  Bravo!  And thanks.
.

Offline

#7 2007-06-03 22:12:08

marxav
Member
From: Gatineau, PQ, Canada
Registered: 2006-09-24
Posts: 386

Re: Proxy for pacman- download packages once for all machines

I can't figure out why I can't write to it, once mounted.  Trying to touch a file as root gives:

touch: cannot touch `/var/cache/pacman/pkg/test.txt': Permission denied

I can read no problem.
I have this on the server in /etc/exports:

/       192.168.0.50(rw,sync)
/var/cache/pacman/pkg 192.168.0.50(rw,sync)

Offline

Board footer

Powered by FluxBB