web/html/docs/beta/mirror-tutorial fedora.css, NONE, 1.1 generated-index.html, NONE, 1.1 index.html, NONE, 1.1 ln-legalnotice.html, NONE, 1.1 rv-revhistory.html, NONE, 1.1 sn-client-config.html, NONE, 1.1 sn-planning-and-setup.html, NONE, 1.1 sn-server-config.html, NONE, 1.1

Paul W. Frields (pfrields) fedora-extras-commits at redhat.com
Wed Sep 28 21:37:04 UTC 2005


Author: pfrields

Update of /cvs/fedora/web/html/docs/beta/mirror-tutorial
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17233/mirror-tutorial

Added Files:
	fedora.css generated-index.html index.html ln-legalnotice.html 
	rv-revhistory.html sn-client-config.html 
	sn-planning-and-setup.html sn-server-config.html 
Log Message:
Added mirror tutorial BETA


--- NEW FILE fedora.css ---
/*

CSS for Red Hat Linux Project docs from the Documentation Project

Written by Tammy Fox and Garrett LeSage

Copyright 2003 Tammy Fox, Garrett LeSage, and Red Hat, Inc.

License: GPL

*/

li p {
	display: inline;
}

div.table table {
	width: 95%;
	background-color: #DCDCDC; 
	color: #000000;
	border-spacing: 0;
}

div.table table th {
	border: 1px solid #A9A9A9;	
	background-color: #A9A9A9;
	color: #000000;
}

div.table table td {
	border: 1px solid #A9A9A9; 
	background-color: #DCDCDC;
	color: #000000;
	padding: 0.5em;
	margin-bottom: 0.5em;
	margin-top: 2px; 

}

div.note table, div.tip table, div.important table, div.caution table, div.warning table {
	width: 95%;
	border: 2px solid #D0D0B0;
	background-color: #FAF9E0;
	color: #000000;
	/* padding inside table area */
	padding: 0.5em;
	margin-bottom: 0.5em;
	margin-top: 0.5em;
}

.qandaset table {
	border-collapse: collapse;
}
.qandaset {
}
.qandaset tr.question {
}
.qandaset tr.question td {
	font-weight: bold;
	padding: 1em 1em 0;
}
.qandaset tr.answer td {
	padding: 0.25em 1em 1.5em;
}
.qandaset tr.question td, .qandaset tr.answer td {
}

hr {
        border: 0;
        border-bottom: 1px solid #ccc;
}

h1, h2, h3, h4 {
        font-family: luxi sans,sans-serif;
	color: #22437f;
	font-weight: bold;
}
h1 {
        font-size: 1.75em;
}
      
h2 {
        font-size: 1.25em;
}

h3 {
        font-size: 1.1em;
}

a:link {
        color: #900;
}
a:visited {
        color: #48468f;
}
a:hover {
        color: #f20;
}

code.screen, pre.screen {
	font-family: monospace;
	font-size: 1em;
	display: block;
	padding: 10px;
	border: 1px solid #bbb;
	background-color: #eee;
	color: #000;
	overflow: auto;
	border-radius: 2.5px;
	-moz-border-radius: 2.5px;
	margin: 0.5em 2em;
}

div.example {
	padding: 10px;
        border: 1px solid #bbb;
	margin: 0.5em 2em;
}

.procedure ol li {
        margin-bottom: 0.5em;
}
.procedure ol li li {
	/* prevent inheritance */
	margin-bottom: 0em;
}

.itemizedlist ul li {
	margin-bottom: 0.5em;
}
.itemizedlist ul li li {
	/* prevent inheritance */
	margin-bottom: 0em;
}


--- NEW FILE generated-index.html ---
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Index</title><link rel="stylesheet" href="fedora.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="index.html" title="Mirror Tutorial - BETA"><link rel="up" href="index.html" title="Mirror Tutorial - BETA"><link rel="prev" href="sn-client-config.html" title="4. Client Configuration"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Index</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="sn-client-config.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> </td></tr></table><hr></div><div class="index"><div class="titlepage"><div><div><h2 class="title"><a name="generated-index"></a>Index</h2></div></div></div><di!
 v class="index"><div class="indexdiv"><h3>A</h3><dl><dt>anaconda, <a href="sn-planning-and-setup.html#sn-copying-original-distribution">Copying the Original Distribution</a></dt><dt>autofs, <a href="sn-client-config.html#sn-autofs">Setting Up autofs</a></dt><dt>automounter map, <a href="sn-client-config.html#sn-autofs">Setting Up autofs</a></dt></dl></div><div class="indexdiv"><h3>D</h3><dl><dt>dependencies, <a href="sn-server-config.html#sn-solving-dependencies">How to Solve Dependencies</a></dt><dt>distribution, <a href="sn-planning-and-setup.html#sn-hierarchy">The Distribution Structure</a></dt></dl></div><div class="indexdiv"><h3>E</h3><dl><dt>exploded tree, <a href="sn-planning-and-setup.html#sn-copying-original-distribution">Copying the Original Distribution</a></dt></dl></div><div class="indexdiv"><h3>M</h3><dl><dt>map</dt><dd><dl><dt>automounter (see automounter map)</dt></dl></dd><dt>mirror, <a href="index.html#sn-about-mirrors">About Mirrors</a></dt><dd><dl><dt>up!
 stream, <a href="index.html#sn-about-mirrors">About Mirrors</a!
 ></dt>
l></dd></dl></div><div class="indexdiv"><h3>R</h3><dl><dt>repository</dt><dd><dl><dt>yum, <a href="sn-server-config.html#sn-repositories">Configuring Repositories</a></dt></dl></dd><dt>RPM, <a href="sn-planning-and-setup.html#sn-hierarchy">The Distribution Structure</a></dt></dl></div><div class="indexdiv"><h3>Y</h3><dl><dt>yum, <a href="sn-server-config.html#sn-solving-dependencies">How to Solve Dependencies</a></dt></dl></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="sn-client-config.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top">4. Client Configuration </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>


--- NEW FILE index.html ---
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Mirror Tutorial - BETA</title><link rel="stylesheet" href="fedora.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="index.html" title="Mirror Tutorial - BETA"><link rel="next" href="sn-planning-and-setup.html" title="2. Planning and Setup"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Mirror Tutorial - <span class="emphasis"><em>BETA</em></span></th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="sn-planning-and-setup.html">Next</a></td></tr></table><hr></div><div class="article" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="mirror-tutorial"></a>Mi!
 rror Tutorial - <span class="emphasis"><em>BETA</em></span></h1></div><div><div class="authorgroup"><div class="author"><h3 class="author"><span class="firstname">
	  Paul
	</span> <span class="othername">
	  W.
	</span> <span class="surname">
	  Frields
	</span></h3></div></div></div><div><p class="copyright">Copyright © 
	2004
       
	Paul W. Frields
      </p></div><div><a href="ln-legalnotice.html">Legal Notice</a></div><div><a href="rv-revhistory.html">Revision History</a></div></div><hr></div><div class="toc"><dl><dt><span class="section"><a href="index.html#sn-introduction">1. Introduction</a></span></dt><dd><dl><dt><span class="section"><a href="index.html#sn-purpose">1.1. Purpose</a></span></dt><dt><span class="section"><a href="index.html#sn-audience">1.2. Audience</a></span></dt><dt><span class="section"><a href="index.html#sn-about-mirrors">1.3. About Mirrors</a></span></dt><dt><span class="section"><a href="index.html#sn-additional-resources">1.4. Additional Resources</a></span></dt><dt><span class="section"><a href="index.html#sn-acknowledgements">1.5. Acknowledgements</a></span></dt></dl></dd><dt><span class="section"><a href="sn-planning-and-setup.html">2. Planning and Setup</a></span></dt><dd><dl><dt><span class="section"><a href="sn-planning-and-setup.html#sn-hierarchy">2.1. The Distribution Structure</a>!
 </span></dt><dt><span class="section"><a href="sn-planning-and-setup.html#sn-copying-original-distribution">2.2. Copying the Original Distribution</a></span></dt><dt><span class="section"><a href="sn-planning-and-setup.html#sn-trimming-tree">2.3. Trimming Branches</a></span></dt><dt><span class="section"><a href="sn-planning-and-setup.html#sn-download-files">2.4. Downloading the Files</a></span></dt><dd><dl><dt><span class="section"><a href="sn-planning-and-setup.html#sn-http-and-ftp-download">2.4.1. Download Using HTTP or FTP</a></span></dt><dt><span class="section"><a href="sn-planning-and-setup.html#sn-rsync">2.4.2. The <code class="command">rsync</code> Command</a></span></dt><dt><span class="section"><a href="sn-planning-and-setup.html#sn-rsync-download">2.4.3. Downloading Using <code class="command">rsync</code></a></span></dt></dl></dd><dt><span class="section"><a href="sn-planning-and-setup.html#sn-maintenance">2.5. Maintaining Your Mirror</a></span></dt></dl></dd><!
 dt><span class="section"><a href="sn-server-config.html">3. Se!
 rver C
iguration Planning</a></span></dt><dd><dl><dt><span class="section"><a href="sn-server-config.html#sn-solving-dependencies">3.1. How to Solve Dependencies</a></span></dt><dt><span class="section"><a href="sn-server-config.html#sn-repositories">3.2. Configuring Repositories</a></span></dt><dd><dl><dt><span class="section"><a href="sn-server-config.html#sn-yum-arch">3.2.1. <code class="command">yum-arch</code></a></span></dt><dt><span class="section"><a href="sn-server-config.html#sn-createrepo">3.2.2. <code class="command">createrepo</code></a></span></dt><dt><span class="section"><a href="sn-server-config.html#sn-repository-locations">3.2.3. Repository Locations</a></span></dt></dl></dd><dt><span class="section"><a href="sn-server-config.html#sn-nfs-config">3.3. Configuring NFS</a></span></dt></dl></dd><dt><span class="section"><a href="sn-client-config.html">4. Client Configuration</a></span></dt><dd><dl><dt><span class="section"><a href="sn-client-config.html#sn-system-con!
 fig-packages">4.1. Configuring <span><strong class="application">system-config-packages</strong></span></a></span></dt><dd><dl><dt><span class="section"><a href="sn-client-config.html#sn-autofs">4.1.1. Setting Up <code class="command">autofs</code></a></span></dt><dt><span class="section"><a href="sn-client-config.html#sn-shared-desktop-s-c-p">4.1.2. <code class="filename">/usr/share/applications/system-config-packages</code></a></span></dt><dt><span class="section"><a href="sn-client-config.html#sn-rpm-aid">4.1.3. The <code class="command">rpm --aid</code> Switch</a></span></dt></dl></dd></dl></dd><dt><span class="index"><a href="generated-index.html">Index</a></span></dt></dl></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sn-introduction"></a>1. Introduction</h2></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sn-purpose"></a>1.1. Pur!
 pose</h3></div></div></div><p>
        This tutorial presents a number of related topics that allow an
        administrator to seamlessly integrate mirroring and update services for
        Fedora Core. You can use these services to provision a classroom, laboratory,
        or office. These service provisions also increase ease of use and
        enhance user experience, adding to the perceived value of
        non-proprietary operating systems and software.
      </p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Reporting Document Errors"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="./stylesheet-images/tip.png"></td><th align="left">Reporting Document Errors</th></tr><tr><td align="left" valign="top"><p>
    To report an error or omission in this document, file a bug report in Bugzilla
    at <a href="http://bugzilla.redhat.com/" target="_top">http://bugzilla.redhat.com/</a>.  When you file your bug, select "Fedora Documentation" as the
    <code class="systemitem">Product</code>, and select the title of this document as
    the <code class="systemitem">Component</code>.  The version of this document is
    mirror-tutorial-0.31 (2005-08-29).
  </p><p>
    The maintainers of this document will automatically receive your bug report.
    On behalf of the entire Fedora community, thank you for helping us make
    improvements.
  </p></td></tr></table></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sn-audience"></a>1.2. Audience</h3></div></div></div><p>
	You will find this tutorial more useful if you are a system
	administrator, or a Fedora Core “<span class="quote">power user</span>” familiar with the
	following topics:
      </p><div class="itemizedlist"><ul type="disc"><li><p>
	    Fedora Core system installation
	  </p></li><li><p>
	    Basic Internet protocols (HTTP/Web, FTP)
	  </p></li><li><p>
	    Using a command line interface
	  </p></li></ul></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sn-about-mirrors"></a>1.3. About Mirrors</h3></div></div></div><p>
	A <span class="emphasis"><em>mirror</em></span>
	<a class="indexterm" name="id2613866"></a> is a server that
	provides a copy of one or more collections of files. Mirroring a site
	reduces traffic to the original source site, thus spreading the stress
	and bandwidth costs of many users across many sites. Side benefits of
	running a local mirror include very fast access through the local
	network, providing custom services to local users, and increasing your
	skills in managing Internet services.
      </p><p>
	The site from which you retrieve files to build your mirror is called an
	<span class="emphasis"><em>upstream mirror</em></span><a class="indexterm" name="id2613887"></a>. If possible, choose an upstream mirror that is located
	close to you geographically. This reduces unnecessary traffic across
	transcontinental sections of the Internet, where bandwidth is limited
	and expensive. Use only upstream mirrors that are intended for public
	access, unless you have permission from the upstream mirror site
	administrator.
      </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sn-additional-resources"></a>1.4. Additional Resources</h3></div></div></div><p>
	For more information on installing Fedora Core see the Fedora Core Installation Guide at
	<a href="http://fedora.redhat.com/docs/fedora-install-guide-en/" target="_top">http://fedora.redhat.com/docs/fedora-install-guide-en/</a>. For more information on basic Internet protocols, see <a href="http://library.albany.edu/internet/internet.html" target="_top">http://library.albany.edu/internet/internet.html</a>,
	or search Google at <a href="http://www.google.com/" target="_top">http://www.google.com/</a>. For more
	general information about mirrors, see <a href="http://en.wikipedia.org/wiki/Mirror_(computing)" target="_top">http://en.wikipedia.org/wiki/Mirror_(computing)</a>.
      </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sn-acknowledgements"></a>1.5. Acknowledgements</h3></div></div></div><p>
	Karsten Wade provided editorial services, keeping the style crisp and
	consistent.
      </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="sn-planning-and-setup.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> 2. Planning and Setup</td></tr></table></div></body></html>


--- NEW FILE ln-legalnotice.html ---
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Legal Notice</title><link rel="stylesheet" href="fedora.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="legalnotice"><p>
    Permission is granted to copy, distribute, and/or modify this document under
    the terms of the GNU Free Documentation License, Version 1.2 or any later
    version published by the Free Software Foundation; with no Invariant
    Sections, no Front-Cover Texts, and no Back-Cover Texts.  A copy of the
    license is available at <a href="http://www.gnu.org/licenses/fdl.html" target="_top">http://www.gnu.org/licenses/fdl.html</a>.
  </p><p>
    This document may be copied and distributed in any medium, either
    commercially or noncommercially, provided that the GNU Free Documentation
    License (FDL), the copyright notices, and the license notice saying the GNU
    FDL applies to the document are reproduced in all copies, and that you add
    no other conditions whatsoever to those of the GNU FDL.
  </p><p>
    Garrett LeSage created the admonition graphics (note, tip, important,
    caution, and warning).
    Tommy Reynolds <code class="email"><<a href="mailto:Tommy.Reynolds at MegaCoder.com">Tommy.Reynolds at MegaCoder.com</a>></code> created the callout graphics.
    They all may be freely redistributed with documentation
    produced for the Fedora Project.
    </p><p>
    mirror-tutorial-0.31 (2005-08-29)
  </p><p>
    Red Hat, Red Hat Network, the Red Hat "Shadow Man" logo, RPM, Maximum RPM, the RPM logo, Linux
    Library, PowerTools, Linux Undercover, RHmember, RHmember More, Rough Cuts,
    Rawhide and all Red Hat-based trademarks and logos are trademarks or registered
    trademarks of Red Hat, Inc. in the United States and other countries.
  </p><p>
    Linux is a registered trademark of Linus Torvalds.
  </p><p>
    Motif and UNIX are registered trademarks of The Open Group.
  </p><p>
    Intel and Pentium are registered trademarks of Intel Corporation. Itanium
    and Celeron are trademarks of Intel Corporation.
  </p><p>
    AMD, AMD Athlon, AMD Duron, and AMD K6 are trademarks of Advanced Micro
    Devices, Inc.
  </p><p>
    Windows is a registered trademark of Microsoft Corporation.
  </p><p>
    SSH and Secure Shell are trademarks of SSH Communications Security, Inc.
  </p><p>
    FireWire is a trademark of Apple Computer Corporation.
  </p><p>
    All other trademarks and copyrights referred to are the property of their
    respective owners.
  </p></div></body></html>


--- NEW FILE rv-revhistory.html ---
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title></title><link rel="stylesheet" href="fedora.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="revhistory"><div class="revhistory"><table border="1" width="100%" summary="Revision history - Mirror Tutorial - BETA"><tr><th align="left" valign="top" colspan="3"><b>Revision History</b></th></tr><tr><td align="left">Revision 0.2</td><td align="left">2004-08-31</td><td align="left">PaulWFrields</td></tr><tr><td align="left" colspan="3">
	  <p>
            Initial version for editorial process.
          </p>
	</td></tr><tr><td align="left">Revision 0.21</td><td align="left">2004-09-02</td><td align="left">PaulWFrields</td></tr><tr><td align="left" colspan="3">
	  <p>
	    Revised screen sections to use inline tags as discussed on
	    fedora-docs-list; minor error corrections.
	  </p>
	</td></tr><tr><td align="left">Revision 0.22</td><td align="left">2004-09-06</td><td align="left">PaulWFrields</td></tr><tr><td align="left" colspan="3">
	  <p>
	    Style editing.
	  </p>
	</td></tr><tr><td align="left">Revision 0.23</td><td align="left">2004-09-08</td><td align="left">PaulWFrields</td></tr><tr><td align="left" colspan="3">
	  <p>
            Additional style editing.
          </p>
	</td></tr><tr><td align="left">Revision 0.24</td><td align="left">2004-09-09</td><td align="left">PaulWFrields</td></tr><tr><td align="left" colspan="3">
	  <p>
	    Brought introduction section in line with Fedora Documentation Project standards.
	  </p>
	</td></tr><tr><td align="left">Revision 0.25</td><td align="left">2004-10-13</td><td align="left">PaulWFrields</td></tr><tr><td align="left" colspan="3">
	  <p>
	    Incorporated all suggested changes by KWade.
	  </p>
	</td></tr><tr><td align="left">Revision 0.26</td><td align="left">2004-12-01</td><td align="left">PaulWFrields</td></tr><tr><td align="left" colspan="3">
	  <p>
	    Updated repository setup to include createrepo.
	  </p>
	</td></tr><tr><td align="left">Revision 0.27</td><td align="left">2004-12-01</td><td align="left">PaulWFrields</td></tr><tr><td align="left" colspan="3">
	  <p>
	    Minor corrections.
	  </p>
	</td></tr><tr><td align="left">Revision 0.28</td><td align="left">2005-01-30</td><td align="left">PaulWFrields</td></tr><tr><td align="left" colspan="3">
	  <p>
	    Minor corrections.
	  </p>
	</td></tr><tr><td align="left">Revision 0.29</td><td align="left">2005-07-22</td><td align="left">PaulWFrields</td></tr><tr><td align="left" colspan="3">
	  <p>
	    Minor note on yum versioning for repodata; fixed entities ref.
	  </p>
	</td></tr><tr><td align="left">Revision 0.30</td><td align="left">2005-08-01</td><td align="left">PaulWFrields</td></tr><tr><td align="left" colspan="3">
	  <p>
	    Add entities and draft notice.
	  </p>
	</td></tr><tr><td align="left">Revision 0.31</td><td align="left">2005-08-29</td><td align="left">PaulWFrields</td></tr><tr><td align="left" colspan="3">
	  <p>
	    Use bug reporting entity, add BETA classification.
	  </p>
	</td></tr></table></div></div></body></html>


--- NEW FILE sn-client-config.html ---
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>4. Client Configuration</title><link rel="stylesheet" href="fedora.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="index.html" title="Mirror Tutorial - BETA"><link rel="up" href="index.html" title="Mirror Tutorial - BETA"><link rel="prev" href="sn-server-config.html" title="3. Server Configuration Planning"><link rel="next" href="generated-index.html" title="Index"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">4. Client Configuration</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="sn-server-config.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="generated-index.html">!
 Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sn-client-config"></a>4. Client Configuration</h2></div></div></div><p>
      You must also correctly configure the client workstations that use your
      mirror. Using the mirror as a source for RPM packages, clients may have
      seamless access for installing basic software through
      <span><strong class="application">system-config-packages</strong></span>, solving RPM package
      installations at the command line, and pulling bug fix and security errata
      updates.
    </p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sn-system-config-packages"></a>4.1. Configuring <span><strong class="application">system-config-packages</strong></span></h3></div></div></div><p>
	Users typically run the
	<span><strong class="application">system-config-packages</strong></span> application from the
	GUI menu, by choosing <span><strong class="guimenu">System Settings</strong></span>,
	<span><strong class="guimenuitem">Add/Remove Applications</strong></span>. This program allows
	the user to change the stock installation, provided no updates have
	taken place yet that interfere.
      </p><p>
	Often, <span><strong class="application">system-config-packages</strong></span> stops
	functioning optimally after certain updates are installed. This is
	because <span><strong class="application">system-config-packages</strong></span> solves
	dependencies based on the stock distribution. It is impossible for
	<span><strong class="application">system-config-packages</strong></span> to predict version
	numbers of updates. If you intend to carry updates on your mirror, you
	should be aware that installing certain updates causes
	<span><strong class="application">system-config-packages</strong></span> to lose its
	effectiveness. Some sites do not mirror all updates due to configuration
	management concerns. The guidance in this section is especially useful
	in those scenarios.
      </p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: yum and
	  system-config-packages"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="./stylesheet-images/tip.png"></td><th align="left"><a name="tp-s-c-p-stock-only"></a><code class="command">yum</code> and
	  <span><strong class="application">system-config-packages</strong></span></th></tr><tr><td align="left" valign="top"><p>
	  If you plan to carry updates on your mirror, as most administrators
	  do, you will probably not use
	  <span><strong class="application">system-config-packages</strong></span> much. Once the
	  installed package versions become out of sync with the original
	  distribution versions, <code class="command">yum</code> becomes much
	  more useful. The preferred method for installing a package in that
	  case would be <code class="command">yum install
	  <em class="replaceable"><code>package_name</code></em></code>. See <a href="sn-server-config.html#sn-solving-dependencies" title="3.1. How to Solve Dependencies">Section 3.1, “How to Solve Dependencies”</a> for more information.
	</p></td></tr></table></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="sn-autofs"></a>4.1.1. Setting Up <code class="command">autofs</code></h4></div></div></div><p>
	  The <code class="command">autofs</code><a class="indexterm" name="id2664603"></a> facility allows a Fedora Core system to mount file systems on
	  demand. The <code class="filename">/etc/auto.master</code> file contains an
	  <span class="emphasis"><em>automounter map</em></span><a class="indexterm" name="id2664622"></a>
	  <a class="indexterm" name="id2664631"></a>. On Fedora Core, the automounter map is a list of additional
	  definition files that should be loaded, one for each directory in the
	  map. An example line from <code class="filename">/etc/auto.master</code> is
	  shown below:
	</p><pre class="screen">
<code class="computeroutput">/misc  /etc/auto.misc  --timeout=60</code>
</pre><p>
	  The first term in the line is the directory which is reserved for
	  automounting. The second term is the automount file which should be
	  consulted to determine any maps for that directory. The third term in
	  the example indicates that if a map under /misc is not busy for 60
	  seconds, it is unmounted.
	</p><p>
	  The <code class="filename">/etc/auto.misc</code> file contains entries similar
	  to the following example.
	</p><pre class="screen">
<code class="computeroutput">remote  -ro,soft,intr  host.foobar.org:/pub</code>
</pre><p>
	  This line is contained in the automounter map file for the
	  <code class="filename">/misc</code> directory. The first term is a key which is
	  the name of a directory that appears upon demand. The second term is
	  actually a list of options, identical to those that would be used for
	  a real <code class="command">mount</code> command. The final term is the file
	  system (local or remote) to mount. In the above example, if the user
	  of this station accesses the directory
	  <code class="filename">/misc/remote</code>, an NFS mount is automatically
	  performed. The user's command appears to hesitate, depending on how
	  fast the NFS server responds. Then <code class="filename">/misc/remote</code>
	  appears to be full of whatever content is on host.foobar.org in the
	  <code class="filename">/pub</code> NFS share.
	</p><p>
	  You can use this function to provide NFS access to the stock
	  distribution for Fedora Core. Choose a directory to map in the
	  <code class="filename">/etc/auto.master</code> file, and match it to a
	  corresponding automounter map file. The easiest way to do this is to
	  simply remove the comment <code class="computeroutput">#</code> from the
	  front of the line attaching <code class="filename">/misc</code> to
	  <code class="filename">/etc/auto.misc</code>. The default timeout should be
	  sufficient.
	</p><p>
	  Make an entry in <code class="filename">/etc/auto.misc</code> similar to
	  this. You can have multiple entries, each one with a different
	  key. For instance, each key could be mapped to a different version of
	  Fedora Core that you have available on the local mirror.
	</p><pre class="screen">
<strong class="userinput"><code>fc4  -ro,soft,intr  mirror.mydomain.org:/var/ftp/pub/linux/fedora/core/4</code></strong>
</pre><p>
	  Now restart the <code class="command">autofs</code> service:
	</p><pre class="screen">
<strong class="userinput"><code>/sbin/service autofs restart</code></strong>
</pre><p>
	  To access the stock distribution for Fedora Core 4 the user can simply
	  type <code class="command">cd /misc/fc4</code>. The share is automatically
	  mounted and the files simply appear in that local directory.
	</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="sn-shared-desktop-s-c-p"></a>4.1.2. <code class="filename">/usr/share/applications/system-config-packages</code></h4></div></div></div><p>
	  Now that <code class="command">autofs</code> has been configured, your client
	  workstations need to be configured so that
	  <span><strong class="application">system-config-packages</strong></span> points to the
	  mirror's NFS share. Edit the
	  <code class="filename">/usr/share/applications/system-config-packages</code>
	  file's <code class="command">Exec=</code> line to add a switch pointing to the
	  share:
	</p><pre class="screen">
<strong class="userinput"><code>Exec=/usr/bin/system-config-packages --tree=/misc/fc4/i386/os</code></strong>
</pre><p>
	  When users choose <span><strong class="guimenu">System Settings</strong></span>,
	  <span><strong class="guimenuitem">Add/Remove Applications</strong></span> from the GUI main
	  menu, the system now automatically resolves package dependencies from
	  the mirror. The restrictions stated above in <a href="sn-client-config.html#tp-s-c-p-stock-only" title="yum and
	  system-config-packages"><code class="command">yum</code> and
	  <span><strong class="application">system-config-packages</strong></span></a> apply.
	</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="sn-rpm-aid"></a>4.1.3. The <code class="command">rpm --aid</code> Switch</h4></div></div></div><p>
	  The <code class="command">--aid</code> switch for the <code class="command">rpm</code>
	  command also automatically solves dependencies. It performs this
	  function based on the <code class="filename">rpmdb-fedora</code> package. That
	  package is a preset database for a system that has every RPM package
	  in the Fedora Core distribution installed. Even if a system does not
	  <span class="emphasis"><em>itself</em></span> have every package installed, it can
	  consult the <code class="filename">rpmdb-fedora</code> package database to see
	  what such a system <span class="emphasis"><em>would</em></span> look like. By using the
	  <code class="command">--aid</code> switch, clients can issue a single
	  <code class="command">rpm --install --aid</code> command against an original
	  Fedora Core package, and have all dependencies automatically installed as
	  well.
	</p><p>
	  Two steps are required for this process. First, install the
	  <code class="filename">rpmdb-fedora</code> package:
	</p><pre class="screen">
<strong class="userinput"><code>rpm --install /misc/fc4/i386/os/Fedora/RPMS/rpmdb-fedora-*.rpm</code></strong>
</pre><p>
	  Then, edit the file <code class="filename">/etc/rpm/macros.solve</code>, which
	  is part of the <code class="filename">rpmdb-fedora</code> package. Change the
	  following lines to enable package resolution:
	</p><pre class="screen">
<code class="computeroutput">%_solve_pkgsdir  /misc/fc4/i386/os/Fedora/RPMS/
%_solve_name_fmt  %{?_solve_pkgsdir}%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm</code>
</pre><p>
	  Users now issue a single command to install any package from
	  the stock distribution, and all dependencies are solved for
	  them. For example:
	</p><pre class="screen">
<strong class="userinput"><code>rpm --install --aid /misc/fc4/i386/os/Fedora/RPMS/kdeutils-*.rpm</code></strong>
</pre><p>
	  If a user forgets the <code class="command">--aid</code> switch, they still
	  receive hints. Normally <code class="command">rpm</code> displays a slightly
	  cryptic list of capability requirements, instead of straightforward
	  package names. If you edit <code class="filename">/etc/rpm/macros.solve</code>
	  as shown, <code class="command">rpm</code> displays a list of required package
	  names instead.
	</p><p>
	  Package dependency solutions using <code class="command">--aid</code> are also
	  restricted as shown above in <a href="sn-client-config.html#tp-s-c-p-stock-only" title="yum and
	  system-config-packages"><code class="command">yum</code> and
	  <span><strong class="application">system-config-packages</strong></span></a>.
	</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="sn-server-config.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="generated-index.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">3. Server Configuration Planning </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Index</td></tr></table></div></body></html>


--- NEW FILE sn-planning-and-setup.html ---
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>2. Planning and Setup</title><link rel="stylesheet" href="fedora.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="index.html" title="Mirror Tutorial - BETA"><link rel="up" href="index.html" title="Mirror Tutorial - BETA"><link rel="prev" href="index.html" title="Mirror Tutorial - BETA"><link rel="next" href="sn-server-config.html" title="3. Server Configuration Planning"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">2. Planning and Setup</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="sn-server-config.html">Next</a!
 ></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sn-planning-and-setup"></a>2. Planning and Setup</h2></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sn-hierarchy"></a>2.1. The Distribution Structure</h3></div></div></div><p>
	The Fedora <span class="emphasis"><em>distribution</em></span><a class="indexterm" name="id2615417"></a>, which is the collection of all Fedora-related files, uses
	the directory tree in <a href="sn-planning-and-setup.html#ex-fedora-dir-tree" title="Example 1. Fedora directory tree">Example 1, “Fedora directory tree”</a>. It may
	include multiple versions of Fedora Core. The tree design makes "trimming" of
	unnecessary or undesired files easier. When setting up a mirror,
	duplicate this tree exactly, or as closely as possible. Doing so makes
	automating nightly updates easier.
      </p><div class="example"><a name="ex-fedora-dir-tree"></a><pre class="screen">
<code class="computeroutput">fedora
+-- linux
    +-- core
        |-- 1 
        |   ... 
        +-- 4 
        |   +-- SRPMS 
        |   +-- i386 
        |   |   +-- debug 
        |   |   +-- iso 
        |   |   +-- os 
        |   |       +-- Fedora 
        |   |       +-- SRPMS 
        |   |       +-- images 
        |   |       +-- isolinux 
        |   +-- x86_64 
        +-- development 
        |      ...
        +-- test 
        |      ...
        +-- updates 
            +-- 1 
            |   ... 
            +-- 4 
            |   +-- SRPMS 
            |   +-- i386 
            |   +-- x86_64 
            +-- testing 
                +-- 1 
                |   ... 
                +-- 4 
                    +-- SRPMS 
                    +-- i386 
                    +-- x86_64</code>
</pre><p class="title"><b>Example 1. Fedora directory tree</b></p></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Naming conventions"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="./stylesheet-images/note.png"></td><th align="left">Naming conventions</th></tr><tr><td align="left" valign="top"><p>
	  Throughout the rest of the document,
	  <code class="filename">/var/ftp/pub/mirror</code> represents the folder where
	  all your mirrored files are stored. You may substitute a different
	  location. This location simplifies sharing your mirror, due to the
	  shipping configuration of Fedora Core. See <a href="sn-server-config.html" title="3. Server Configuration Planning">Section 3, “Server Configuration Planning”</a>
	  for more information.  The site name
	  <code class="computeroutput">mirror.example.com</code> represents the
	  upstream mirror.
	</p></td></tr></table></div><p>
	The
	<code class="filename">fedora/linux/core/4/<em class="replaceable"><code>arch</code></em>/os</code>
	directory contains a copy of all the original distribution files
	for Fedora Core 4. They are the same files found on the DVD and
	CD-ROM version of the distribution. The
	<code class="filename">Fedora</code> subfolder contains all the files that
	are necessary for installation, including the entire collection
	of Fedora Core RPM packages. The <code class="filename">images</code> folder
	contains copies of any floppy diskette or CD-ROM images that
	boot a system into installation or rescue modes. The
	<code class="filename">fedora/linux/core/4/<em class="replaceable"><code>arch</code></em>/iso</code>
	folder contains images of the CD-ROM version of the
	distribution.
      </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: RPM packages"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="./stylesheet-images/note.png"></td><th align="left">RPM packages</th></tr><tr><td align="left" valign="top"><p>
	  <em class="firstterm">RPM</em><a class="indexterm" name="id2615661"></a>, originally the Red Hat Package Manager and now the RPM
	  Package Manager, is not just a file format. RPM is also a system which
	  tracks and interconnects software and version information. The RPM
	  system is quite popular, and many other Linux distributions use RPM as
	  well. Read more information on RPM at <a href="http://www.rpm.org/" target="_top">http://www.rpm.org/</a>. This document
	  contains helpful hints on making the most of RPM, in <a href="sn-server-config.html" title="3. Server Configuration Planning">Section 3, “Server Configuration Planning”</a> and
	  <a href="sn-client-config.html" title="4. Client Configuration">Section 4, “Client Configuration”</a>.
	</p></td></tr></table></div><p>
	The <code class="filename">SRPMS</code> folders under architecture-specific
	branches are links which point to the main <code class="filename">SRPMS</code>
	folder for that distribution. For example,
	<code class="filename">fedora/linux/core/2/i386/os/SRPMS</code> is a link which
	points to <code class="filename">fedora/linux/core/2/SRPMS</code>.
      </p><p>
	A Fedora mirror consists of at least the original ISO images
	<span class="emphasis"><em>or</em></span> the distribution files. If possible, include
	both, provided you have sufficient disk space and/or bandwidth.
      </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sn-copying-original-distribution"></a>2.2. Copying the Original Distribution</h3></div></div></div><p>
	If you already have reliable CD-ROM installation discs of a
	distribution, reduce your initial bandwidth and time spent mirroring by
	copying the files from the discs to your server.  Copy all files from
	Installation Disc 1 into the
	<code class="filename">fedora/linux/core/4/<em class="replaceable"><code>arch</code></em>/os</code>
	folder. Then copy all files from the <code class="filename">Fedora</code> folder
	of each of the remaining Installation discs into the
	<code class="filename">fedora/linux/core/4/<em class="replaceable"><code>arch</code></em>/os/Fedora</code>
	folder on the server.
      </p><p>
	Copy all the files from the <code class="filename">SRPMS</code> folder on each of
	the “<span class="quote">Sources</span>” discs to the
	<code class="filename">fedora/linux/core/4/SRPMS</code> folder on the
	server. Make a link in the <code class="filename">os</code> folder that occurs
	under each architecture. Follow this example:
      </p><pre class="screen">
<strong class="userinput"><code>cd /var/ftp/pub/mirror/fedora/linux/core/4/i386/os/Fedora
ln ../../SRPMS SRPMS</code></strong>
</pre><p>
	The documentation for <span><strong class="application">anaconda</strong></span><a class="indexterm" name="id2661744"></a>, the Fedora Core installation program, calls this directory
	structure an <em class="firstterm">exploded tree</em><a class="indexterm" name="id2661758"></a>. This is because the package data on each CD is extracted,
	or exploded, to a large directory tree with a predetermined structure.
	The <span><strong class="application">anaconda</strong></span> installer expects this structure
	to some extent.
      </p><p>
	If you <span class="emphasis"><em>only</em></span> include CD images, create a mirror
	suitable for installation services by mounting each CD image under the
	<code class="filename"><em class="replaceable"><code>arch</code></em>/os/</code> directory. Make
	a directory for each disc, naming them <code class="filename">disc1</code>,
	<code class="filename">disc2</code>, and so on. Mount each disc on the
	appropriate folder, and add entries to <code class="filename">/etc/fstab</code>
	to perform this mount automatically in case of a reboot. Each entry
	looks like this:
      </p><pre class="screen">
<code class="computeroutput">/path/i386/iso/FC4-i386-disc1.iso  /path/i386/os/disc1  iso9660  defaults  0 0</code>
</pre><p>
	The <span><strong class="application">anaconda</strong></span> application automatically
	detects these folders and uses them properly. In addition, system
	configuration tools such as
	<span><strong class="application">system-config-packages</strong></span> also continue to work
	properly when pointed at the parent of the ISO image mount points.
      </p><p>
	There are drawbacks to using CD ISO images in this fashion. For
	instance, no one directory contains the entire distribution of RPM
	packages. Soft links circumvent this problem, but your server security
	policies may not permit them. Fedora Core also comes in a ISO format DVD image,
	which alleviates this problem. Users who do not have DVD burning
	hardware, however, cannot use this image to make discs for their own
	use.
      </p><p>
	You only need a single line in <code class="filename">/etc/fstab</code>
	for mounting the Fedora Core DVD ISO image.  The entry looks like this:
      </p><pre class="screen">
<code class="computeroutput">/path/i386/iso/FC4-i386-DVD.iso  /path/i386/os  iso9660  defaults  0 0</code>
</pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sn-trimming-tree"></a>2.3. Trimming Branches</h3></div></div></div><p>
	You may omit almost any branch of the tree that you do not plan to use.
	Consider carefully the impact of excluding that folder. Branches you
	might trim from your mirror include:
      </p><div class="variablelist"><dl><dt><span class="term">Older versions of Fedora Core (any numbered directory).</span></dt><dd><p>
	      Before you exclude an old version, ensure
	      this does not adversely affect any of your users. These adverse
	      affects can come in many forms. For example, the level of support
	      for certain hardware sometimes changes between releases of Fedora Core.
	      Users who cannot install a previous version may not be able to use
	      Fedora Core. Your users might need to perform software-related tasks such
	      as building packages for different Fedora Core releases. Always remain
	      aware of the needs of your users during the planning stage.
	    </p></dd><dt><span class="term">Folders for architectures your site does not support.</span></dt><dd><p>
	      If you do not have any x86-64 hosts to support, trimming these
	      folders eliminates several gigabytes of extra files. If you
	      support x86-64 hosts later, though, you must restore mirroring of
	      these branches.
	    </p></dd><dt><span class="term">The <code class="filename">development</code> folder (formerly
	    “<span class="quote">Rawhide</span>”).</span></dt><dd><p>
	      This folder contains all the latest “<span class="quote">bleeding-edge</span>”
	      packages from the Fedora Project. If you participate in active Fedora
	      development, you should not trim this branch. Fedora development
	      moves at a rapid pace and requires frequent updates to the latest
	      development package versions. However, the frequent updates cause
	      your mirror to download significant amounts of material during the
	      regular update cycle.
	    </p></dd><dt><span class="term">The <code class="filename">testing</code> folders.</span></dt><dd><p>
	      These branches contain updates that are being subjected to quality
	      assurance through public testing, as well as the test or
	      “<span class="quote">pre-release</span>” versions of the Fedora Core distribution. The
	      <code class="filename">testing</code> folder under the main
	      <code class="filename">core</code> tree is where test versions of the
	      distribution, such as Fedora Core 4 test1, are kept. (Users of Fedora Core
	      test distributions are often directed to use the
	      <code class="filename">development</code> branch to update packages.) The
	      <code class="filename">testing</code> folder, under
	      <code class="filename">updates</code>, contains package updates that have
	      not yet passed the public testing phase.
	    </p></dd><dt><span class="term">The <code class="filename">debug</code> folders.</span></dt><dd><p>
	      These folders contain packages that enable developers and
	      skilled users to interpret data created when a program
	      crashes or encounters a bug. If you participate actively
	      in Fedora development, you should not trim these
	      folders. If you trim this branch, you may still download
	      individual packages as needed from a nearby public mirror
	      site.
	    </p></dd><dt><span class="term">The <code class="filename">SRPMS</code> folders (and links
	    thereto).</span></dt><dd><p>
	      These folders contain the original source for all the
	      binary RPM packages in the distribution. You may download
	      these packages individually as needed to save space on
	      your local mirror.
	    </p></dd></dl></div><p>
	Unless your site closely manages workstation configuration, you should
	probably not trim any of the <code class="filename">updates</code> branches for
	the distributions you support. These locations contain packages handling
	bug fixes, security patches, and errata updates which your users
	probably want.
      </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sn-download-files"></a>2.4. Downloading the Files</h3></div></div></div><p>
	Locate a public mirror site for Fedora Core by referring to the main project
	site's mirror page, <a href="http://fedora.redhat.com/projects/docs/" target="_top">http://fedora.redhat.com/projects/docs/</a>. Once you have selected a nearby mirror
	site, note what services it offers (FTP, HTTP, and/or rsync). A mirror
	is usually servicing a large number of users. Choose off-peak hours,
	when possible, to download a large set of files. Be aware of any
	timezone differences when estimating off-peak hours.
      </p><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="sn-http-and-ftp-download"></a>2.4.1. Download Using HTTP or FTP</h4></div></div></div><p>
	  To download via HTTP or FTP, use the <code class="command">wget</code> command.
	  <code class="command">wget</code> recurses subdirectories automatically and
	  pulls down entire trees of data with a single command. If you are not
	  careful, however, it is possible to pull down much more data than you
	  intended. The following commands mirror the entire current Fedora Core
	  distribution:
	</p><pre class="screen">
<strong class="userinput"><code>cd /var/ftp/pub/mirror 
wget --mirror -np -nH --cut-dirs=<em class="replaceable"><code>2</code></em> http://mirror.example.com/pub/mirror/fedora/linux/core/4/</code></strong>
</pre><p>
	  Note the options used above:
	</p><div class="itemizedlist"><ul type="disc"><li><p>
	      <code class="command">--mirror</code> turns on recursion (descends into all
	      subdirectories), and duplicates file timestamps;
	    </p></li><li><p>
	      <code class="command">-np</code> prevents <code class="command">wget</code> from
	      ascending into the parent directory;
	    </p></li><li><p>
	      <code class="command">-nH</code> prevents <code class="command">wget</code> from
	      writing a directory named after the host (in this case,
	      <code class="filename"><em class="replaceable"><code>mirror.example.com</code></em></code>);
	    </p></li><li><p>
	      <code class="command">--cut-dirs=<em class="replaceable"><code>n</code></em></code>
	      truncates the first <em class="replaceable"><code>n</code></em> directories in
	      the path. In the example above, <code class="command">--cut-dirs=2</code>
	      prevents <code class="command">wget</code> from writing the
	      <code class="filename"><em class="replaceable"><code>/pub/mirror</code></em></code>
	      portion of the path into your mirror.
	    </p></li></ul></div><p>
	  The same syntax works for both HTTP and FTP mirrors. It is possible
	  that you may download some extraneous files if the HTTP site formats
	  its pages for browser viewing. These files can be safely deleted, but
	  return each time the mirror updates unless you exclude them using
	  special options. See the <code class="command">wget</code> man pages for more
	  information.
	</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="sn-rsync"></a>2.4.2. The <code class="command">rsync</code> Command</h4></div></div></div><p>
	  Use the <code class="command">rsync</code> command to synchronize a set of files
	  and/or directories with a remote host. It operates in much the same
	  way as <code class="command">rcp</code>, but it is usually faster. One reason
	  for the speed is that <code class="command">rsync</code> has a special protocol
	  that evaluates and skips files (or portions of files) that are already
	  downloaded.
	</p><p>
	  Begin by identifying the modules available on the upstream mirror site
	  you have chosen. Note that the double colon “<span class="quote">::</span>” is
	  always used after the host name to separate it from the rest of the
	  <code class="command">rsync</code> path. The following command generates a list
	  of “<span class="quote">modules</span>” on the upstream mirror. 
	</p><pre class="screen">
<strong class="userinput"><code>rsync mirror.example.org::</code></strong>
</pre><p>
	  These modules are roughly equivalent to top-level directories, and
	  they follow the same rules. To list any subdirectory of the upstream
	  mirror, add the directory path to the command above. For example, on
	  many mirrors, the <code class="filename">fedora-linux-core</code> module is
	  equivalent to the <code class="filename">fedora/linux/core</code> path found at
	  the Fedora Project main download server. To list the contents of the Fedora Core
	  4 distribution folder on the upstream server, issue the
	  following command. Do not forget the trailing slash “<span class="quote">/</span>”.
	  Without it, you only receive a listing of a folder name that matches
	  the last component of the remote path.
	</p><pre class="screen">
<strong class="userinput"><code>rsync mirror.example.org::fedora-linux-core/4/</code></strong>
</pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="sn-rsync-download"></a>2.4.3. Downloading Using <code class="command">rsync</code></h4></div></div></div><p>
	  To download via <code class="command">rsync</code>, add a destination path on
	  your system to the end of the command line. The resulting tree of
	  files from the listing you perform are downloaded to the local path
	  you specify. Remember, if you leave off the trailing slash on the
	  remote path, then the last component of that path is created as a
	  folder, and its contents are copied.
	</p><pre class="screen">
<strong class="userinput"><code>rsync filehouse.example.org::files/misc/ /var/ftp/pub/misc/</code></strong>
</pre><p>
	  When downloading using <code class="command">rsync</code> for mirror purposes,
	  use some of the command line switches to improve performance and
	  feedback. The switches <code class="command">-PHav</code> enable the following
	  <code class="command">rsync</code> features:
	</p><div class="itemizedlist"><ul type="disc"><li><p>
	      <code class="command">-P</code> — recover partially-downloaded files,
	      and show a progress meter
	    </p></li><li><p>
	      <code class="command">-H</code> — preserve hard links
	    </p></li><li><p>
	      <code class="command">-a</code> — recurse all directories, and preserve
	      as much file information as possible, including timestamps,
	      ownership, permissions, device files (if you are running as root),
	      and soft links
	    </p></li><li><p>
	      <code class="command">-v</code> — give verbose feedback to the screen
	    </p></li></ul></div><p>
	  Remove the <code class="command">-v</code> switch if you run this mirroring
	  process as part of a script, or have no need to monitor progress. The
	  following example mirrors all available versions of Fedora Core from an
	  upstream site.
	</p><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Caution: Example command downloads many gigabytes of files"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="./stylesheet-images/caution.png"></td><th align="left">Example command downloads many gigabytes of files</th></tr><tr><td align="left" valign="top"><p>
	    This command downloads many gigabytes of files, and is intended for
	    use as an example only. Do not run this command if you do not
	    understand the consequences.
	  </p></td></tr></table></div><pre class="screen">
<strong class="userinput"><code>rsync -PHav mirror.example.org::fedora-linux-core/4/ /var/ftp/pub/mirror/fedora/core/4</code></strong>
</pre><p><a name="rsync-n-switch"></a>
	  The <code class="command">-n</code> switch performs a “<span class="quote">dry run</span>”
	  using the other given parameters. Use this switch to test any
	  <code class="command">rsync</code> command if you are unsure what files you will
	  receive. See also <a href="sn-planning-and-setup.html#rsync-possible-data-loss" title="Possible data loss">Possible data loss</a>.
	</p><p>
	  The <code class="command">-z</code> switch enables compression during the
	  <code class="command">rsync</code> process. The server compresses data before
	  transmission, and the client decompresses the data before writing it
	  to disk.
	</p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Compression using rsync"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="./stylesheet-images/tip.png"></td><th align="left">Compression using <code class="command">rsync</code></th></tr><tr><td align="left" valign="top"><p>
	    The vast majority of the Fedora Core distribution consists of RPM files,
	    which are already compressed data. Therefore, additional compression
	    does not save time, and instead induces an unnecessary load on the
	    upstream mirror CPU. As a courtesy, do not use the
	    <code class="command">-z</code> switch for this purpose.
	  </p></td></tr></table></div><p>
	  The next section features some additional switches that can be used to
	  automatically trim branches from the tree of downloaded folders. With
	  proper usage, they result in a mirror that is exactly as organized and
	  full-featured as any high-volume public upstream site.
	</p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Warning: Possible data loss"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="./stylesheet-images/warning.png"></td><th align="left"><a name="rsync-possible-data-loss"></a>Possible data loss</th></tr><tr><td align="left" valign="top"><p>
	    If you are not exceedingly careful in using these switches, it is
	    possible to delete large portions of your mirrored data. Fixing this
	    problem might simply require performing the copying steps outlined
	    in <a href="sn-planning-and-setup.html#sn-copying-original-distribution" title="2.2. Copying the Original Distribution">Section 2.2, “Copying the Original Distribution”</a> above. On the
	    other hand, if you are also careless about your destination path,
	    and you are running as root, you could put your entire system at
	    risk. Know your environment before using these switches:
	  </p><div class="itemizedlist"><ul type="disc"><li><p>
		What is your current working directory? Use
		<code class="command">pwd</code> to find out, if you are unsure.
	      </p></li><li><p>
		Are you logged in as root? If you are using SELinux extensions,
		what is your current security context?
	      </p></li><li><p>
		Have you tested this command using the <code class="command">-n</code>
		switch (see <a href="sn-planning-and-setup.html#rsync-n-switch">Section 2.4.3, “Downloading Using <code class="command">rsync</code>”</a>)?
	      </p></li></ul></div></td></tr></table></div><p>
	  Use the <code class="command">--exclude</code> switch, along with a simple
	  pattern, to disallow download of certain files and/or folders. For
	  instance, <code class="command">--exclude "*.iso"</code> excludes the download
	  of any file whose name ends with the string ".iso".
	</p><p>
	  Use the <code class="command">--delete</code> switch, again with a pattern, to
	  remove any file from the local system which does not have a match on
	  the upstream mirror. This switch prevents unwanted <em class="firstterm">file
	    debris</em> from cropping up in your mirror. You can also use
	  it to retroactively trim branches of the tree which you no longer wish
	  to maintain or download.
	</p><p>
	  Wildcards are permitted with <code class="command">rsync</code> commands,
	  including the asterisk <code class="computeroutput">*</code>, question
	  mark <code class="computeroutput">?</code>, and brackets
	  <code class="computeroutput">[ ]</code>. The question mark and brackets
	  work as in the shell; the former matches any single character, while
	  the brackets define a set of characters to be matched. Asterisks are
	  especially powerful when combined with a portion of a file name. The
	  double asterisk <code class="computeroutput">**</code> pattern matches
	  any character, <span class="emphasis"><em>including slashes</em></span>; a single
	  asterisk <code class="computeroutput">*</code> matches any character, but
	  stops at a slash. Therefore, be judicious about using either. The
	  double asterisk is very useful for mirroring a tree that includes
	  multiple instances of directories and files that contain a pattern. A
	  good example is mirroring several versions of Fedora Core, where certain
	  folder names appear in every version.
	</p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Pattern matching wildcards"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="./stylesheet-images/tip.png"></td><th align="left">Pattern matching wildcards</th></tr><tr><td align="left" valign="top"><p>
	    Use double asterisks to trim out directories that repeat throughout
	    a mirrored tree. For example, when mirroring for a site that
	    only uses i386 architecture machines, you may trim all files and
	    folders marked for x86_64 architecture, using the switch
	    <code class="command">--exclude "**x86_64**"</code>. This matches not only
	    folders marked <code class="filename">x86_64</code>, but also files such as
	    ISO images for x86_64, which are indicated by file names such as
	    <code class="filename">FC4-x86_64-disc1.iso</code>.
	  </p></td></tr></table></div><p>
	  Process a long list of exclusions and deletions with the
	  <code class="command">--exclude-from</code> and <code class="command">--delete-from</code>
	  options. Follow each tag with a file name that includes a list of
	  patterns, one per line, to be matched by the appropriate option.
	</p><p>
	  These syntax hints only scratch the surface of
	  <code class="command">rsync</code>, but suffice to make your first mirror. Once
	  you have selected your site and formulated your excludes and deletes,
	  run your <code class="command">rsync</code> command with the
	  <code class="command">-n</code> option. Redirect output to a file so you can
	  examine the resulting list of files in the editor or pager of your
	  choice.
	</p><p>
	  The following example mirrors the entire Fedora Core 4 distribution,
	  with <code class="command">--exclude</code> options that avoid downloading:
	</p><div class="itemizedlist"><ul type="disc"><li><p>
	      Any information for x86_64 architecture;
	    </p></li><li><p>
	      Any <code class="command">yum</code> headers (see <a href="sn-server-config.html#sn-repositories" title="3.2. Configuring Repositories">Section 3.2, “Configuring Repositories”</a>);
	    </p></li><li><p>
	      Any <code class="filename">debuginfo</code> packages; and,
	    </p></li><li><p>
	      CD or DVD images.
	    </p></li></ul></div><p>
	  The <code class="command">-n</code> switch is included for testing purposes.
	  Backslashes at the ends of lines indicate this example is a single
	  command line.
	</p><pre class="screen">
<strong class="userinput"><code>rsync -Pan --delete --exclude "**x86_64**" --exclude "**headers**" \
  --exclude "**debug**" --exclude "**iso**" \
  mirror.example.com::fedora-linux-core/4/ \
  /var/ftp/pub/mirror/fedora/core/4</code></strong>
</pre></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sn-maintenance"></a>2.5. Maintaining Your Mirror</h3></div></div></div><p>
	Fedora mirrors are even more useful when they are more than just a
	snapshot of the distribution at release time. Most mirror administrators
	also choose to carry updates and errata packages. Repositories of
	updates or development trees change daily, and your mirror should
	reflect these changes.
      </p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: rsync etiquette"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="./stylesheet-images/important.png"></td><th align="left"><code class="command">rsync</code> etiquette</th></tr><tr><td align="left" valign="top"><p>
	  If you plan to do regular updates of your mirror that include large
	  amounts of data, you should ask permission from the administrator of
	  the upstream mirror. Downloading nightly package updates for the
	  official releases of Fedora Core 4 should not require notification, as
	  they are rarely more than a few megabytes. However, the
	  <code class="filename">development</code> tree routinely turns over several
	  hundred megabytes nightly. Take these factors into consideration
	  before putting any maintenance scripts into effect.
	</p></td></tr></table></div><p>
	Once your <code class="command">rsync</code> command is working as desire, you may
	want to place it in a nightly <code class="command">cron</code> script. The
	<code class="command">cron</code> system allows you to schedule
	regularly-occurring jobs on your system. The intervals are highly
	configurable, but a nightly run keeps your mirror synchronized with
	updates and errata. Make sure your nightly <code class="command">cron</code> job
	follows some simple guidelines:
      </p><div class="itemizedlist"><ul type="disc"><li><p>
	    If your upstream mirror only synchronizes once or twice daily, run
	    your job <span class="emphasis"><em>after</em></span> the upstream mirror completes
	    its update. This insures your mirror not only gets the freshest
	    material, but also does not interfere with the upstream server's
	    bandwidth while it runs its job. If you do not know this time, it is
	    usually safe to plan your downloads for pre-dawn hours.
	  </p></li><li><p>
	    Be sure you have sufficient disk space for additional packages. The
	    <code class="filename">updates</code> tree in particular grows over time as
	    more errata packages are released.
	  </p></li><li><p>
	    Always test your script thoroughly before allowing it to run
	    automatically. Use a <code class="command">-n</code> or <code class="command">-v</code>
	    switch in the <code class="command">rsync</code> command line for testing, and
	    then remove it once you have completed testing. Remember that the
	    results are e-mailed to your account on your system unless you
	    specify differently. Read the <code class="command">crontab(5)</code> man
	    pages for additional information, with the command <code class="command">man 5
	      crontab</code>.
	  </p></li></ul></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="sn-server-config.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Mirror Tutorial - <span class="emphasis"><em>BETA</em></span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 3. Server Configuration Planning</td></tr></table></div></body></html>


--- NEW FILE sn-server-config.html ---
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>3. Server Configuration Planning</title><link rel="stylesheet" href="fedora.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="index.html" title="Mirror Tutorial - BETA"><link rel="up" href="index.html" title="Mirror Tutorial - BETA"><link rel="prev" href="sn-planning-and-setup.html" title="2. Planning and Setup"><link rel="next" href="sn-client-config.html" title="4. Client Configuration"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">3. Server Configuration Planning</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="sn-planning-and-setup.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a a!
 ccesskey="n" href="sn-client-config.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sn-server-config"></a>3. Server Configuration Planning</h2></div></div></div><p>
      Decide what services your mirror will offer to clients. There are at least
      three services useful for providing Fedora installation and update
      services: HTTP, FTP, and NFS. Some or all of these services can be used
      for offering post-installation functions such as updates or installing
      additional packages.
    </p><p>
      Install the <code class="filename">vsftpd</code> package for FTP services. Install
      the <code class="filename">httpd</code> package to use the Apache HTTP server. Most
      Fedora Core systems already have the <code class="command">nfs-utils</code> package
      installed, which contains the NFS server.
    </p><p>
      To start a service, use the <code class="command">/sbin/service
      <em class="replaceable"><code>service</code></em> start</code> command. To enable that
      server by default at boot time, use the <code class="command">chkconfig
      <em class="replaceable"><code>service</code></em> on</code> command.
    </p><p>
      One recommended method is to download all mirrored files into
      <code class="filename">/var/ftp/pub</code>, add a link in
      <code class="filename">/var/www/html</code> that points to
      <code class="filename">/var/ftp/pub</code>, and share out
      <code class="filename">/var/ftp/pub</code> via NFS as well. FTP and HTTP services
      do not require any further configuration to work properly.
      <span class="emphasis"><em>However, you should evaluate your site's security needs before
	enabling them.</em></span> NFS service configuration is explained below
      in <a href="sn-server-config.html#sn-nfs-config" title="3.3. Configuring NFS">Section 3.3, “Configuring NFS”</a>.
    </p><p>
      To share out the public FTP area via HTTP, issue the following
      command:
    </p><pre class="screen">
<strong class="userinput"><code>ln -s /var/ftp/pub /var/www/html/pub</code></strong>
</pre><p>
      Your clients may now visit any area of your mirror by using the URL
      <em class="replaceable"><code>http://server.mydomain.org/pub/path</code></em>. To create
      an NFS share, add a line to <code class="filename">/etc/exports</code>. This
      example shares out the Fedora Core 4 i386 stock distribution with read-only
      access for any host in the <code class="computeroutput">mydomain.org</code>
      domain.
    </p><pre class="screen">
<strong class="userinput"><code>/var/ftp/pub/linux/fedora/core/4/i386/os  *.mydomain.org(ro,sync,root_squash)</code></strong>
</pre><p>
      To reread the NFS server configuration files and export the new share, use
      the following command:
    </p><pre class="screen">
<strong class="userinput"><code>exportfs -ar</code></strong>
</pre><p>
      Refer to <a href="sn-server-config.html#sn-nfs-config" title="3.3. Configuring NFS">Section 3.3, “Configuring NFS”</a> for a list of commands for
      starting services both on demand and at boot time.
    </p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sn-solving-dependencies"></a>3.1. How to Solve Dependencies</h3></div></div></div><p>
	Every RPM package has a <span class="emphasis"><em>header</em></span> that contains all
	the vital information about that package. This information includes
	name, version and release, contents, the capabilities provided by the
	package, and any prerequisites. These prerequisites may include
	<span class="emphasis"><em>dependencies</em></span><a class="indexterm" name="id2663559"></a>. A dependency is a requirement for one or more additional
	packages.
      </p><p>
	Packages installed without satisfying their dependencies may not work
	correctly. Dependencies may create a problem for users who are trying to
	install a single package. Manually determining and resolving
	dependencies is difficult. Fedora Core provides the
	<code class="command">yum</code> utility for solving these
	dependencies automatically, providing an improved user experience.
      </p><p>
	The Yellow Dog Updater Modified, or
	<span class="emphasis"><em>yum</em></span><a class="indexterm" name="id2663590"></a>, is a Python-based system for computing and solving
	RPM dependencies. A <code class="command">yum</code> client retrieves a
	cache of headers from its repository server, as well as a list
	of available RPM packages and their exact locations on the
	server. It can do this via HTTP or FTP, as well as using
	standard file system calls (either local or remote via NFS). The
	client computes solutions to any package dependencies using the
	downloaded header information, and simply requests all necessary
	RPM packages once it has finished. The <code class="command">yum</code>
	command relies on <code class="command">rpm</code> functions to perform
	many of the computations involved in the process.
      </p><p>
	A drawback to <code class="command">yum</code> is that the first time it
	is run, it must download a header for every package installed on
	the system in order to determine available updates. However,
	running a local mirror nullifies this drawback. The
	<code class="command">yum</code> command can, of course, download many
	megabytes of headers almost instantly on a standard Ethernet
	LAN. The <code class="command">yum</code> utility is the most popular
	update method for Fedora Core.
      </p><p>
	For more information about using <code class="command">yum</code>, refer
	to <a href="http://fedora.redhat.com/docs/yum/" target="_top">http://fedora.redhat.com/docs/yum/</a>.
      </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sn-repositories"></a>3.2. Configuring Repositories</h3></div></div></div><p>
	A <code class="command">yum</code> <span class="emphasis"><em>repository</em></span><a class="indexterm" name="id2663689"></a> is a collection of packages on a server which supports
	<code class="command">yum</code> clients. Repositories can serve both types of
	clients if desired.
      </p><p>
	To set up a <code class="command">yum</code> repository, you must write a
	directory that contains information which the clients require to resolve
	RPM dependencies. The directory's name depends on the version of
	<code class="command">yum</code> it supports. It is permissible to have both kinds
	of repository information in a single repository.
      </p><p>
	To support older <code class="command">yum</code> clients, use the
	<code class="command">yum-arch</code> command.  To support current
	<code class="command">yum</code> clients, use the
	<code class="command">createrepo</code> command.
      </p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Supporting Fedora Core 3 and beyond"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="./stylesheet-images/important.png"></td><th align="left">Supporting Fedora Core 3 and beyond</th></tr><tr><td align="left" valign="top"><p>
	  Fedora Core 3 ships with a newer version of <code class="command">yum</code>.
	  To support Fedora Core 3 <code class="command">yum</code> clients, you
	  <span class="emphasis"><em>must</em></span> use <code class="command">createrepo</code> on
	  your server's repositories.
	</p></td></tr></table></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="sn-yum-arch"></a>3.2.1. <code class="command">yum-arch</code></h4></div></div></div><p>
	  A directory which supports older versions of <code class="command">yum</code>
	  (before 2.2) is named <code class="filename">headers</code>. It is created by
	  using the command <code class="command">yum-arch</code>, which is run against
	  the directory <span class="emphasis"><em>under which</em></span> you want the
	  <code class="filename">headers</code> directory to appear. The
	  <code class="command">yum-arch</code> program searches recursively through that
	  directory and any subdirectories for RPM packages, and includes them
	  in the header data.
	</p><pre class="screen">
<strong class="userinput"><code>yum-arch -l -s /var/ftp/pub/linux/fedora/core/4/i386/os</code></strong>
</pre><p>
	  The <code class="command">-l</code> switch follows symbolic links. The
	  <code class="command">-s</code> switch includes SRPMS (source RPM packages) in
	  the header list. The command above creates the <code class="command">yum</code>
	  header cache in the directory
	  <code class="filename">/var/ftp/pub/linux/fedora/core/4/i386/os/headers</code>.
	</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="sn-createrepo"></a>3.2.2. <code class="command">createrepo</code></h4></div></div></div><p>
	  The <code class="command">createrepo</code> command creates repository
	  information to support newer versions of <code class="command">yum</code> (and
	  possibly other repository client programs). The
	  <code class="command">createrepo</code> command stores this data in a folder
	  named <code class="filename">repodata</code>. Just as with
	  <code class="command">yum-arch</code>, run <code class="command">createrepo</code> against
	  the directory <span class="emphasis"><em>under which</em></span> you want the
	  <code class="filename">repodata</code> directory to appear. The
	  <code class="command">createrepo</code> program also searches recursively for
	  RPM packages to include in the repository data.
	</p><p>
	  The following command creates the repository data in the directory
	  <code class="filename">/var/ftp/pub/linux/fedora/core/4/i386/os/repodata</code>.
	</p><pre class="screen">
<strong class="userinput"><code>createrepo /var/ftp/pub/linux/fedora/core/4/i386/os</code></strong>
</pre><p>
	  You may not be able to foresee all the possible uses for your server's
	  repositories. To minimize problems for your clients, create both kinds
	  of repository data for any repositories.
	</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="sn-repository-locations"></a>3.2.3. Repository Locations</h4></div></div></div><p>
	  Typically <code class="command">yum-arch</code> or <code class="command">createrepo</code>
	  is run against at least the following locations:
	</p><div class="itemizedlist"><ul type="disc"><li><p>
	      The stock distribution; for example,
	      <code class="filename">/var/ftp/pub/linux/fedora/core/4/i386/os/</code>.
	      For <code class="command">yum-arch</code> use the <code class="command">-l</code> and
	      <code class="command">-s</code> options to follow the linked directory
	      <code class="filename">SRPMS</code> and include the source packages
	      therein.
	    </p></li><li><p>
	      Official updates to the distribution; for example,
	      <code class="filename">/var/ftp/pub/linux/fedora/core/updates/4/</code>.
	      Once again, for <code class="command">yum-arch</code> use
	      <code class="command">-l</code> and/or <code class="command">-s</code> if appropriate.
	    </p></li></ul></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sn-nfs-config"></a>3.3. Configuring NFS</h3></div></div></div><p>
	Some client-side utilities also resolve dependencies automatically.
	These utilities require more detailed configuration of the client
	workstation. For more information, see <a href="sn-client-config.html" title="4. Client Configuration">Section 4, “Client Configuration”</a> below. These utilities, however, require
	standard file system access to package collections. For this reason, you
	may require NFS on your mirror. Configuration of the client depends
	in large part on how you decide to implement NFS sharing on the mirror.
      </p><p>
	It is difficult to share subdirectories of other shared directories.
	Therefore, think of your mirror as offering many services, each one to
	be considered for NFS sharing. For example, share both the stock
	distribution of Fedora Core 2 and the stock distribution of Fedora Core 3.
      </p><p>
	The client side tools discussed later can use a directory of ISO images
	or an exploded tree of package data (see <a href="sn-planning-and-setup.html#sn-copying-original-distribution" title="2.2. Copying the Original Distribution">Section 2.2, “Copying the Original Distribution”</a>). You may share out any or
	all of these, provided your shares do not clash as described above.
      </p><p>
	To share via NFS, edit the <code class="filename">/etc/exports</code> file. A
	typical share, exported with read-only access for any host on any
	network, looks like this:
      </p><pre class="screen">
<code class="computeroutput">/mnt/media *(ro,all_squash,async)</code>
</pre><p>
	The <code class="command">all_squash</code> option ensures that no users accessing
	the share using their local root account receive equivalent access on
	the share. This feature keeps some small measure of security even on a
	public share, since a file readable only by root on the server is not
	readable by an NFS client. The <code class="command">async</code> option allows
	asynchronous read/writes, which is not dangerous in this case because
	the share is read-only. The <code class="command">*</code> is a host designator,
	in this case matching any host name or IP address. You may wish to
	restrict this share to your internal network. You may declare either a
	matching name or IP address specification. You can find more detailed
	information by reading the man pages for the
	<code class="filename">/etc/exports</code> file by using the command <code class="command">man
	  5 exports</code>.
      </p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Access control format"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="./stylesheet-images/important.png"></td><th align="left">Access control format</th></tr><tr><td align="left" valign="top"><p>
	  Be certain that you do not have a space between the host specification
	  and the option listing in parentheses <code class="computeroutput">(
	    )</code>. A space causes the NFS daemon to consider that
	  entry as <span class="emphasis"><em>two separate access controls</em></span>. In the
	  example above, a space causes the first access control to match all
	  hosts and allow write access, which is the default! The second access
	  control is never reached because the first matches any host first.
	</p></td></tr></table></div><p>
	To share the proper directories from your mirror, use one of the
	following forms. To share your exploded tree, export the directory that
	contains the Fedora folder (note the capitalization). For i386
	architectures:
      </p><pre class="screen">
<strong class="userinput"><code>/var/ftp/pub/linux/fedora/core/4/i386/os *(ro,all_squash,async)</code></strong>
</pre><p>
	To share a directory full of ISO images, export that directory:
      </p><pre class="screen">
<strong class="userinput"><code>/var/ftp/pub/linux/fedora/core/4/i386/iso *(ro,all_squash,async)</code></strong>
</pre><p>
	Once you have edited the <code class="filename">/etc/exports</code> file, make
	sure that the NFS server is installed and started properly on the
	mirror. The <code class="filename">portmap</code> and
	<code class="filename">nfs-utils</code> packages must be installed. Configure
	them to be turned on at boot time by default.
      </p><pre class="screen">
<strong class="userinput"><code>/sbin/chkconfig portmap on
/sbin/chkconfig nfslock on
/sbin/chkconfig nfs on</code></strong>
</pre><p>
	To check if any of these services are currently running, use the
	<code class="command">/sbin/service <em class="replaceable"><code>service_name</code></em>
	status</code> command:
      </p><pre class="screen">
<strong class="userinput"><code>/sbin/service portmap status
/sbin/service nfslock status
/sbin/service nfs status</code></strong>
</pre><p>
	To restart a service, use the <code class="command">/sbin/service
	<em class="replaceable"><code>service_name</code></em> restart</code> command:
      </p><pre class="screen">
<strong class="userinput"><code>/sbin/service portmap restart
/sbin/service nfslock restart
/sbin/service nfs restart</code></strong>
</pre><p>
	If any service is not started, use the command <code class="command">/sbin/service
	<em class="replaceable"><code>service_name</code></em> start</code> to start it, as
	in the following examples:
      </p><pre class="screen">
<strong class="userinput"><code>/sbin/service portmap start
/sbin/service nfslock start
/sbin/service nfs start</code></strong>
</pre><p>
	To change your exports when the NFS service is already running, use the
	command <code class="command">/usr/sbin/exportfs -ar</code>. The command
	<code class="command">/usr/sbin/showmount -e</code> displays a list of the
	current NFS exports on the local host machine.
      </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="sn-planning-and-setup.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="sn-client-config.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">2. Planning and Setup </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 4. Client Configuration</td></tr></table></div></body></html>




More information about the fedora-extras-commits mailing list