On configuring a mirror

Erinn Looney-Triggs erinn.looneytriggs at gmail.com
Thu Feb 4 12:08:00 CST 2010


Just wanted to throw these instructions out there for anyone who is 
looking to configure a mirror of the dell linux repositories.  I just 
went through this process yesterday, I didn't really find anything that 
covered all of this, or anything much at all except the location for 
rsyncing. There may, of course, be errors or omissions in here, but so 
far it has worked for me.

What you will need:
Apache configured to allow cgi and includes
/usr/bin/python  (scripts depends on this, not sure if there are perl 
requirements too, you are probably fine on a linux system, but others 
such as openbsd will have to have these installed).
rsync

The rsync repo is located at rsync://linux.dell.com/repo/. You can of 
course only mirror parts of that if you like but that there is the whole 
enchilada. Make sure you use the -H flag to preserve hard links.

Here is the line that works for me:
rsync -aqH --inplace --delete rsync://linux.dell.com/repo/. 
<destination_on_localhost>.

Configure apache for includes and cgi:
Uncomment:
AddHandler cgi-script .cgi

Uncomment:
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

Configure apache's vhost from which you will be serving the repository:
You will need the following configuration options:
Options +Indexes +ExecCGI +Includes
HeaderName HEADER.shtml  #For the nice headers

Here is a skeleton config for what worked for me:
<VirtualHost <your_ip>:80>
     DocumentRoot <repo_location>
<Directory <repo_location>>
         Options +Indexes +ExecCGI +Includes
         Order allow,deny
         Allow from all
         AllowOverride All
</Directory>
     HeaderName HEADER.shtml
     ServerName <your_server_name>
</VirtualHost>

 From here installation and configuration of the repo from a client 
system is the same, the scripts are smart enough to point the installed 
repo to the right location (your mirror).

So:

wget -q -O - http://<url_of_your_repository>/repo/hardware/latest/bootstrap.cgi | sudo bash


If running the above command doesn't scare you, it probably should.

I hope this helps someone out in the future. It didn't take a great deal 
of time to reverse all of this stuff but it would have been nice to have 
these instructions.

-Erinn



More information about the Linux-PowerEdge mailing list