Difference between revisions of "Freeside:1.7:Documentation:MirroringRPMRepoYaST:Setup"
(→Initial Setup) |
|||
Line 67: | Line 67: | ||
*Test the repository: | *Test the repository: | ||
**Load <code>http://mirror.ip.or.hostname/freeside-repo</code> in your web browser. | **Load <code>http://mirror.ip.or.hostname/freeside-repo</code> in your web browser. | ||
+ | |||
==Refreshing Your Mirror== | ==Refreshing Your Mirror== | ||
Line 85: | Line 86: | ||
The above commands can be put in a shell script and executed periodically via cron. | The above commands can be put in a shell script and executed periodically via cron. | ||
+ | |||
+ | |||
=Using Your Mirror= | =Using Your Mirror= |
Revision as of 13:30, 7 May 2009
Contents
Mirroring the Freeside 1.7 Testing RPM Repository with YaST2
Introduction
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.
Instructions
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.
Replace server.domain.tld
in the following with your actual server name.
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 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/
(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 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/
- 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 </Directory>
- Reload your web server:
service apache2 reload
- Test the repository:
- Load
http://mirror.ip.or.hostname/freeside-repo
in your web browser.
- Load
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 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/ wget --mirror --no-parent --no-host-directories --cut-dirs=3 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/
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.