Difference between revisions of "Pacserve"

From ArchWiki
Jump to: navigation, search
(Added Include line must be before existing line, not instead of, or after. Otherwise does not work.)
(flagged broken section links (interactive))
(Tag: wiki-scripts)
Line 6: Line 6:
== Installation ==
== Installation ==
You can either install {{AUR|pacserve}} manually from the [[AUR]], or from one of the [[Unofficial_user_repositories#xyne-any|xyne-any]], [[Unofficial_user_repositories#xyne-x86_64|xyne-x86_64]] or [[Unofficial_user_repositories#xyne-i686|xyne-i686]] unofficial repositories.
You can either install {{AUR|pacserve}} manually from the [[AUR]], or from one of the [[Unofficial_user_repositories#xyne-any|xyne-any]], [[Unofficial_user_repositories#xyne-x86_64|xyne-x86_64]] or [[Unofficial_user_repositories#xyne-i686|xyne-i686]]{{Broken section link}} unofficial repositories.
Finally [[start/enable]] {{ic|pacserve.service}}.
Finally [[start/enable]] {{ic|pacserve.service}}.

Revision as of 02:15, 25 November 2017

Pacserve allows to easily share pacman packages between computers. This is very useful, if you have a slow internet connection, but multiple machines running Arch Linux.


You can either install pacserveAUR manually from the AUR, or from one of the xyne-any, xyne-x86_64 or xyne-i686[broken link: invalid section] unofficial repositories.

Finally start/enable pacserve.service.

In case you use iptables, you will probably want to start pacserve-ports.service too.

Standalone usage

Instead of pacman, use the pacsrv wrapper to perform an update, install packages and so on. It will automatically download all packages from the LAN, if someone hosts them with pacserve there. Otherwise it will just download them from the internet mirrors, as usually. For example:

# pacsrv -Syu
# pacsrv -S openssh

Configure Pacman to use Pacserve

If you are always running the pacserve daemon and want pacman to use it without the wrapper, insert the following line (before any other Include lines) in each repository in /etc/pacman.conf.

 Include = /etc/pacman.d/pacserve

Here is an example for the Xyne repository:

SigLevel = Required
Include  = /etc/pacman.d/pacserve
Server   = http://xyne.archlinux.ca/repos/xyne

Alternatively (for official mirrors only), you may insert the Include line at the top of the Pacman mirrorlist file or let pacman.conf-insert_pacserve generate a pacman.conf file for you.


Problems if using external downloaders in pacman.conf

If you are using an external downloader such as wget, pacsrv may return errors when downloading. To work around these errors, simply quote the url and output formatting strings (%u resp. %o) using single quotes:

XferCommand = /usr/bin/wget --timeout=6 --passive-ftp -c -O '%o' '%u'