From Freeside
Jump to: navigation, search

Mirroring the Freeside 1.7 Testing RPM Repository with YaST2


This page explains how to mirror the i386 version of the Freeside 1.7 branch "testing" RPM repository for SuSE Linux Enterprise Server (SLES) 10, using wget. Instructions on how to use your mirror using YaST2 and zypper are on another page. There's more discussion on the main page on mirroring the RPM repository.

Proxy Servers

The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.


Initial Setup

The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you download the files into a folder (/srv/www/freeside-repo) and then make that folder available to your local client machines via a web server.

To set up the mirror initially:

  • Create a folder on the machine that will act as your repository server:
mkdir /srv/www/freeside-repo
  • Copy down the repository from the Freeside web server:
cd /srv/www/freeside-repo
wget --mirror --no-parent --no-host-directories --cut-dirs=3

(The trailing slash after the i386 prevents wget from downloading all repositories at the same level as the i386 folder.)

  • Copy down the corresponding self-service server files:
wget --mirror --no-parent --no-host-directories --cut-dirs=3
  • The Freeside web server auto-generated index.html files. Remove them from the mirror:
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;
  • Make the folder available via the web server. Put an Apache configuration snippet in a file (freeside-repo.conf) in /etc/apache2/conf.d:
Alias /freeside-repo /srv/www/freeside-repo
<Directory /srv/www/freeside-repo>
Options +Indexes
Allow From All
Order Deny,Allow
  • Reload your web server:
service apache2 reload

Refreshing Your Mirror

To refresh the mirror, just repeat the steps to copy down the files:

cd /srv/www/freeside-repo
wget --mirror --no-parent --no-host-directories --cut-dirs=3
wget --mirror --no-parent --no-host-directories --cut-dirs=3

And remove the index.html files generated by the web server from the mirror:

find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;

The above commands can be put in a shell script and executed periodically via cron.

Using Your Mirror

Full instructions for using your mirror are on a separate page.