Registering your mirror
Now that your configuration is almost done, you must register your mirror, regardless if it is a private or a public mirror.
Get a Fedora account
First, you need to go to https://admin.fedoraproject.org/accounts/ and get yourself a Fedora account. Without this, you can’t proceed further. However, you may choose to not sign the Fedora Contributor License Agreement (CLA), which is not required if you only want to be a mirror administrator. Still, do consider signing the CLA, as other contributions to Fedora require it, and with all the fun you’re having as a mirror administrator, you may find other aspects of Fedora you want to be part of, as well.
Register your mirror
At this point, let me introduce MirrorManager, the database that automatically keeps track of the mirrors. Go to https://admin.fedoraproject.org/mirrormanager/ and log in with the credentials you just created. Here you need to do only two things.
First, create a site using the [Add Site] link under My Sites and Hosts. What you need to put into the fields is explained at the side of these fields and is self-explanatory—take a look at Figure 3.
Once you fill in the form and save the site, you will find a new link, My Hosts. Now add a host to it (see Figure 4). The difference between a host and a site is that a site is about the details of the parent organisation (for example, a university), while the host is about the details of the individual machines hosting the Fedora repositories (for example, a server). Obviously, a site can have multiple hosts.
You can restrict your mirror within the organisation using the Private checkbox. Once you save the host, you will have a few more options to fine tune your mirror.
One particularly unique feature of MirrorManager is its ability to specify a list of network addresses (netblocks) that belong to each organisation. By adding your organisation’s netblock delegation to the database, MirrorManager will automatically direct all users coming from within that netblock to your mirror, with no configuration changes necessary on the part of the user. For example, if your organisation has the usable public IP range, say, from 18.104.22.168 to 22.214.171.124 and it has a subnet mask 255.255.255.224 — it means that you need to enter 126.96.36.199/27 as your netblock.
Now that your site and the host have been created, it is time to inform the MirrorManager database about your mirror content. For this, you need to install
mirrormanager-client. You can do it very easily using the following command:
# yum -y install mirrormanager-client
You need to edit a configuration file minimally. Once the installation is done, you will find the configuration file under /etc/mirrormanager-client/report_mirror.conf. Edit it suitably to reflect the content and the paths of your mirror.
[global] # if enabled=0, no data is sent to the database enabled=1 server=https://admin.fedoraproject.org/mirrormanager/xmlrpc [site] # if enabled=0, no data about this site is sent to the database enabled=1 name=WBSUB mirror password=***** [host] # if enabled=0, no data about this host is sent to the database enabled=1 name=188.8.131.52 [Fedora Linux] enabled=1 path=/var/www/html/pub/fedora/linux #replace this with your path_to_content
You will find more categories under this. If you have these contents, set
enabled=1 or set
enabled=0. You can also delete them without a problem.
Once this much has been done, run
report_mirror script using:
$ /usr/bin/report_mirror -c /etc/mirrormanager-client/report_mirror.conf
Once successfully completed, it will show “Checked in successfully”. You can now see the contents of your mirror under your MirrorManager host. You should run
report_mirror following each successful rsync run.
Congratulations! You have successfully finished mirroring Fedora. Also, you have acquired a rare set of practical skills in the process. It is time to celebrate, but don’t forget a few complementary things that are yet to be done.
Subscribe to mailing lists
To be notified about the releases and other details, you should subscribe to the http://www.redhat.com/mailman/listinfo/mirror-list announcement list, and to http://www.redhat.com/mailman/listinfo/mirror-list-d, which is a discussion list.
These lists are private, so you need to send an e-mail to mirror-admin AT fedoraproject DOT org with the link to your host in MirrorManager so that they can approve your subscription.
Secure Your Server
Once your server is on the public domain, be sure to get all sort of attacks directed towards you. It is advisable that you apply all security patches, setup a firewall using iptables and restrict ssh access to one or two particular users using
However, detailed discussions in this regard is not in the scope of this article. You need to know security practices and secure your server as efficiently as possible.
For further information and if you like to contribute, you should go through these sites:
In the end, let me take this opportunity to express my heartiest thanks to Matt Domsch, Fedora Mirror Wrangler, and Eric ‘Sparks’ Christensen, Fedora Documentation Project Lead, who have reviewed this article, suggested improvements and helped me to make it better.
If you have questions, comments or suggestions, subscribe and drop a mail to fedora-india mailing list at www.redhat.com/mailman/listinfo/fedora-india or stop by #fedora-india or #fedora-admin on IRC. You can also drop me a mail at susmit AT fedoraproject DOT org.