Difference between revisions of "Local Mirror"

From ArchWiki
Jump to: navigation, search
(Wiped out Page and included brief info - https://bbs.archlinux.org/viewtopic.php?pid=818921#p818921)
Line 5: Line 5:
 
{{Note| If you want to create an official mirror see [http://wiki.archlinux.org/index.php/DeveloperWiki:NewMirrors this page].}}
 
{{Note| If you want to create an official mirror see [http://wiki.archlinux.org/index.php/DeveloperWiki:NewMirrors this page].}}
  
 +
==STOP==
  
It is generally frowned upon to create a local mirror due the bandwidth that is required. There is not a good reason to create a local mirror, since one of the alternatives below will likely meet your needs.<br/><br/>
+
It is generally frowned upon to create a local mirror due the bandwidth that is required. One of the alternatives will likely fulfill your needs. Please look at the alternatives below.
  
'''Alternatives:'''
+
 
 +
===Alternatives:===
 
*[[Network Shared Pacman Cache]]
 
*[[Network Shared Pacman Cache]]
 
*[http://xyne.archlinux.ca/info/pkgd pkgd]
 
*[http://xyne.archlinux.ca/info/pkgd pkgd]
 +
 +
 +
==Local Mirror==
 +
 +
'''Things to keep in mind:'''
 +
* Bandwidth is not free for the mirrors. They must pay for all the data they serve you
 +
** This still applies although you pay for an internet connection
 +
* There are many packages that will be downloaded that you will likely never use
 +
* Mirror operators will much prefer you to download only the packages you need
 +
* Really please look at the alternatives above
 +
 +
'''If you are absolutely certain that a local mirror is the only sensible solution, then follow the pointers below.'''
 +
 +
===Server Configuration===
 +
====Building Rsync Command====
 +
* Use the rsync arguments from [http://wiki.archlinux.org/index.php/DeveloperWiki:NewMirrors DeveloperWiki:NewMirrors]
 +
* Select a server from the above article
 +
* Exclude files you don't want by including --exclude-from="/path/to/exclude.txt"  in the rsync arguments
 +
/path/to/exclude.txt
 +
<pre>community-staging
 +
iso
 +
gnome-untsable
 +
kde-unstable
 +
staging
 +
</pre>
 +
*Insure to include community-testing, testing, and multilib if you don't use those repositories
 +
**TIP: If you only need i686 packages exclude x86_64 by including core/os/x86_64 in exclude.txt
 +
***Do the oposite if you need x86_64 packages only
 +
***Insure you do this for core, extra, and testing
 +
 +
Example: rsync ''$rsync_arguments'' --exclude="/path/to/exclude.txt" ''rsync://example.com/'' /path/to/destination
 +
 +
====Serving====
 +
*HTTP (LAN)
 +
**[[LAMP]]
 +
**[[Lighttpd]]
 +
*FTP (LAN)
 +
**[[vsftpd]]
 +
*Physical Media
 +
**Flash Drive
 +
**External HD
 +
 +
===Client Configuration===
 +
*Add the proper Server= variable in /etc/pacman.d/mirrorlist
 +
*For physical media (such as flash drive) the following can be used: Server = file:///mnt/media/repo

Revision as of 19:10, 19 September 2010

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Note: If you want to create an official mirror see this page.

STOP

It is generally frowned upon to create a local mirror due the bandwidth that is required. One of the alternatives will likely fulfill your needs. Please look at the alternatives below.


Alternatives:


Local Mirror

Things to keep in mind:

  • Bandwidth is not free for the mirrors. They must pay for all the data they serve you
    • This still applies although you pay for an internet connection
  • There are many packages that will be downloaded that you will likely never use
  • Mirror operators will much prefer you to download only the packages you need
  • Really please look at the alternatives above

If you are absolutely certain that a local mirror is the only sensible solution, then follow the pointers below.

Server Configuration

Building Rsync Command

  • Use the rsync arguments from DeveloperWiki:NewMirrors
  • Select a server from the above article
  • Exclude files you don't want by including --exclude-from="/path/to/exclude.txt" in the rsync arguments

/path/to/exclude.txt

community-staging
iso
gnome-untsable
kde-unstable
staging
  • Insure to include community-testing, testing, and multilib if you don't use those repositories
    • TIP: If you only need i686 packages exclude x86_64 by including core/os/x86_64 in exclude.txt
      • Do the oposite if you need x86_64 packages only
      • Insure you do this for core, extra, and testing

Example: rsync $rsync_arguments --exclude="/path/to/exclude.txt" rsync://example.com/ /path/to/destination

Serving

Client Configuration

  • Add the proper Server= variable in /etc/pacman.d/mirrorlist
  • For physical media (such as flash drive) the following can be used: Server = file:///mnt/media/repo