Pacserve

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

Installation

Install pacserveAUR.

Tip: The package is also available in the xyne-x86_64 unofficial repository.

Finally start/enable pacserve.service.

In case you use iptables, you will probably want to start pacserve-ports.service too. For other firewalls open TCP port 15678 and UDP port 15679. The UDP port can be limited to multicast traffic only.

Configuration

The pacserve.service can configured by editing PACSERVE_ARGS in /etc/pacserve/pacserve.service.conf. Run pacserve --help to see the available options.

Avahi

To announce and discover Pacserve using mDNS add the option --avahi to PACSERVE_ARGS in /etc/pacserve/pacserve.service.conf.

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 lines) in each repository in .

Include = /etc/pacman.d/pacserve

Here is an example for the Xyne repository:

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

Troubleshooting

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 ( resp. %o) using single quotes:

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

Machines do not see each other

Peers detection relies on version of . TCP multicast frames coming from a different version of the service are discarded. In this case, running as root will warn about such unrecognized frames. Upgrade this package first then restart the pacserve.service.

gollark: Unfortunately, that isn't practical.
gollark: I was thinking that, but turtles are quite æ to work with.
gollark: I MADE a bunch, but they are in storage.
gollark: In modded survival.
gollark: Also, anyone know how I can efficiently place vast amounts of PotatOS Potatocomputers™?

See also

This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.