How to create public mirrors for CentOS

CentOS welcomes new mirror sites.

If you are considering setting up a public mirror site for CentOS please follow these guidelines to make sure that your mirror is consistent with the other mirror sites.

As a first step, we'd like you to be subscribed to the following lists:

For hard disk space requirements, please refer to the dir_sizes files in the root directory of http://mirror.centos.org/. Please note that at point release times (such as 6.8 -> 6.9) both the old and new releases will be kept on mirrors for a few weeks.

For your first mirror synchronization, you must use one of the external mirrors providing rsync access. You can find that list here: https://centos.org/download/mirrors/

You should also set up a cron job to sync your mirror from that external mirror periodically. Once you have verified that your mirror syncs properly and all your mirror URLs work, please email the centos-mirror mailing list with your mirror details. Once we have verified that your mirror matches the requirements, we will add you to our list of mirror sites and you can switch to rsyncing from rsync://msync.centos.org/CentOS/

Before submitting your mirror, you should check that all your mirror URLs work properly from outside your organization. Firewall problems are surprisingly common. If your mirror has an IPv6 address, you should check IPv4 and IPv6 separately. Both curl and rsync have -4 and -6 options for selecting the protocol.

In your mirror submission, please provide all relevant URLs (http/https/rsync) as well as how often you are synchronizing from the mirror network. Please include what city/state/country you are in and what your bandwidth (speed) is. Also please give a name and link to the sponsoring organization so we can give proper credit. If the best contact point for your mirror is not the address you are subscribed to the mailing list with, please provide the email address of your preferred contact as well.

The following template can be used when sending your mail to the centos-mirror list. Please note that you need to be subscribed to the list before you can write to the list. Messages from non-subscribers will be silently dropped.

HTTP: http://your.domain.com/centos/ 
HTTPS: https://your.domain.com/centos/ (if you provide https access)
RSYNC: rsync://your.domain.com/centos/ (if you provide rsync access)

Sync schedule: Every x hrs
Bandwidth: 
Location: (For U.S. and Canada: also mention the state/province)
Sponsor: 
Sponsor URL:
IPv4 address to authorize: 
IPv6 address to authorize: 
Email contact: (where we'll send notifications for issues with your mirror)
Mirroring AltArch: yes/no (and if so, let us know the URLs, as those will be different from your http/https/rsync paths for CentOS)

We are currently concentrating on HTTP and RSYNC mirrors. We no longer accept FTP URLs for new mirrors. HTTPS is currently not used for mirrors, but we have started collecting HTTPS URLs for possible future inclusion to the mirrorlist. If you set up HTTPS, please do not redirect HTTP requests to HTTPS. There may be organizations that allow outbound HTTP connections but not HTTPS connections, and any redirects may cause problems for them.

Public mirrors should synchronize 2-4 times per day and this should be run via cron. We highly recommend the use of lock files in your cron script so that you don't spawn multiple connections which is hard on our servers and on your mirror. If you don't know how to do this, please ask the list.

Once your server has been added to the mirrors database, and your IP allowed, the best way to keep your mirror updated directly from a centos.org machine would be to use the following script (to give you an idea):

rsync -aqzH --delete msync.centos.org::CentOS /path/to/local/mirror/root

There are actually two rsync targets/modules that people can sync from :

NOTE:
EU users may wish to use eu-msync.centos.org::CentOS
US users may wish to use us-msync.centos.org::CentOS

TIP: If you are using >= 2.6.4 version of rsync, you might want to specify the --delay-updates switch to the above line in your cron job)

NOTE: If you have a data cap which is lower than 15 Tb (depending on region), please don't try to add that machine as a mirror. Please also note: If you are in a country which already has a lot of mirrors (like most western countries do, but also some Asian countries), please refrain from trying to add mirrors which have less than 100Mbit/s. If there aren't that many mirrors in your country, we will also accept lower speeds, naturally.

Please alert the CentOS-mirror mailing list if anything about the server changes like location, available bandwidth, frequency of updates, etc.

HowTos/CreatePublicMirrors (last edited 2018-09-19 21:42:02 by AnssiJohansson)