Configuring local mirror of Linux distributions

From Fireball
Jump to: navigation, search

Local mirrors of many important linux distributions and packages is available on

This tutorial explains the steps to recreate this mirroring system

Installing HTTP servers

A web server is installed with as a dependency of the mediawiki package but could be installed idenpendently using:

yum install httpd

Excluding some directories

The mirror site on is far larger that we can host The file '/root/mirror.exclude' is created to exclude some directories of being copied.



Using crontab for programming the downloads

Edit a file 'crontab' for the root user like this:

# use /bin/sh to run commands, overriding the default set by cron
# mail any output to `root'
13   0,6,18 * * * rsync -av --delete rsync://  /home/ftp 
--exclude-from /root/mirror.exclude > /root/mirror.log

Activate the cron calling the crontab command

crontab crontab

Activate HTTP mirror access

Create this file for configuring the mirror access:


# Local mirror of many linux distros and software repositories

Alias /mirror /home/ftp

<Location /mirror>
#Deny from all
Allow from all
Require all granted
Options All Indexes FollowSymLinks

#  Require local
#  Require ip
#  Require host