Difference between revisions of "Pacserve"

From ArchWiki
Jump to: navigation, search
(typo)
m (Problems if using external downloaders in pacman.conf: rm curl example - does not make sense to have both uncommented in pacman.conf)
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
[[Category:Package management]]
 +
[[Category:Networking]]
 
[http://xyne.archlinux.ca/projects/pacserve/ Pacserve] allows to easily share pacman packages between computers. This is very useful, if you have a slow internet conenction, but multiple machines running Arch Linux.
 
[http://xyne.archlinux.ca/projects/pacserve/ Pacserve] allows to easily share pacman packages between computers. This is very useful, if you have a slow internet conenction, but multiple machines running Arch Linux.
  
=Installation=
+
==Installation==
 
You can either install pacserve manually from the [[AUR]], or with the following method:
 
You can either install pacserve manually from the [[AUR]], or with the following method:
  
==from Xyne's repository==
+
===from Xyne's repository===
 
add this to your /etc/pacman.conf, replace (x86_64 with i686 or any if necessary):
 
add this to your /etc/pacman.conf, replace (x86_64 with i686 or any if necessary):
 
  [xyne-x86_64]
 
  [xyne-x86_64]
Line 12: Line 14:
  
 
now install pacserve:
 
now install pacserve:
  # pacman -S pacserve
+
  # pacman -Sy pacserve
  
 
and enable / start the daemon:
 
and enable / start the daemon:
Line 18: Line 20:
 
  # systemctl start pacserve.service
 
  # systemctl start pacserve.service
  
in case you use iptables, you'll probably want this service: pacserve-ports
+
in case you use iptables, you will probably want this service: pacserve-ports
  
=Usage=
+
==Usage==
 
Instead of pacman, use the pacsrv wrapper to perform an update/install packages etc. 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:
 
Instead of pacman, use the pacsrv wrapper to perform an update/install packages etc. 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 -Syu
 
  pacsrv -S openssh
 
  pacsrv -S openssh
 +
 +
=== Problems if using external downloaders in pacman.conf ===
 +
 +
If you're 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 ({{ic|%u}} resp. {{ic|%o}}) using single quotes:
 +
 +
XferCommand = /usr/bin/wget --timeout=6 --passive-ftp -c -O '%o' '%u'

Revision as of 17:24, 20 September 2013

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

Installation

You can either install pacserve manually from the AUR, or with the following method:

from Xyne's repository

add this to your /etc/pacman.conf, replace (x86_64 with i686 or any if necessary):

[xyne-x86_64]
# A repo for Xyne's own projects: http://xyne.archlinux.ca/projects/
SigLevel = Required
Server = http://xyne.archlinux.ca/repos/xyne

now install pacserve:

# pacman -Sy pacserve

and enable / start the daemon:

# systemctl enable pacserve.service
# systemctl start pacserve.service

in case you use iptables, you will probably want this service: pacserve-ports

Usage

Instead of pacman, use the pacsrv wrapper to perform an update/install packages etc. 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

Problems if using external downloaders in pacman.conf

If you're 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'