Author: pfrields
Update of /cvs/docs/mirror-tutorial In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10438
Modified Files: mirror-tutorial-en.xml Log Message: Major changes to simplify, more on the way...
Index: mirror-tutorial-en.xml =================================================================== RCS file: /cvs/docs/mirror-tutorial/mirror-tutorial-en.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- mirror-tutorial-en.xml 18 Sep 2005 22:43:44 -0000 1.10 +++ mirror-tutorial-en.xml 12 Oct 2005 22:41:50 -0000 1.11 @@ -5,7 +5,10 @@ <!ENTITY % FEDORA-ENTITIES-EN SYSTEM "../docs-common/common/fedora-entities-en.ent"> %FEDORA-ENTITIES-EN;
-<!ENTITY BOOKID "mirror-tutorial-0.31 (2005-08-29)"> <!-- change version of manual and date here --> +<!ENTITY BOOKNAME "mirror-tutorial"> +<!ENTITY BOOKVERSION "0.32"> +<!ENTITY BOOKDATE "2005-10-12"> +<!ENTITY BOOKID "&BOOKNAME;-&BOOKVERSION; (&BOOKDATE;)"> <!-- change version of manual and date here -->
<!ENTITY BUG-NUM "130125"> <!ENTITY FCLOCALVER "4"> @@ -158,6 +161,16 @@ </para> </revdescription> </revision> + <revision> + <revnumber>0.32</revnumber> + <date>2005-10-12</date> + <authorinitials>PaulWFrields</authorinitials> + <revdescription> + <para> + Fix default network sharing protocol (#169581, #169584) + </para> + </revdescription> + </revision> </revhistory> </articleinfo>
@@ -305,7 +318,7 @@ <title>Naming conventions</title> <para> Throughout the rest of the document, - <filename>/var/ftp/pub/mirror</filename> represents the folder where + <filename>/var/www/mirror</filename> 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 &FC;. See <xref linkend="sn-server-config"/> @@ -332,17 +345,14 @@ <note> <title>RPM packages</title> <para> - <firstterm>RPM</firstterm><indexterm> - <primary>RPM</primary> - </indexterm>, 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 <ulink - url="http://www.rpm.org/%22%3Ehttp://www.rpm.org/</ulink>. This document - contains helpful hints on making the most of RPM, in <xref - linkend="sn-server-config"/> and - <xref linkend="sn-client-config"/>. + <firstterm>RPM</firstterm><indexterm> <primary>RPM</primary> + </indexterm>, 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 <ulink + url="http://www.rpm.org/%22%3Ehttp://www.rpm.org/</ulink>. </para> </note> <para> @@ -381,7 +391,7 @@ </para>
<screen> -<userinput>cd /var/ftp/pub/mirror/fedora/linux/core/&FCVER;/i386/os/Fedora +<userinput>cd /var/www/mirror/fedora/linux/core/&FCVER;/i386/os/Fedora ln ../../SRPMS SRPMS</userinput> </screen>
@@ -408,7 +418,7 @@ </para>
<screen> -<computeroutput>/path/i386/iso/FC&FCVER;-i386-disc1.iso /path/i386/os/disc1 iso9660 defaults 0 0</computeroutput> +<computeroutput>/<replaceable>path</replaceable>/i386/iso/FC&FCVER;-i386-disc1.iso /<replaceable>path</replaceable>/i386/os/disc1 iso9660 defaults 0 0</computeroutput> </screen>
<para> @@ -433,7 +443,7 @@ </para>
<screen> -<computeroutput>/path/i386/iso/FC&FCVER;-i386-DVD.iso /path/i386/os iso9660 defaults 0 0</computeroutput> +<computeroutput>/<replaceable>path</replaceable>/i386/iso/FC&FCVER;-i386-DVD.iso /<replaceable>path</replaceable>/i386/os iso9660 defaults 0 0</computeroutput> </screen>
</section> @@ -564,7 +574,7 @@ </para>
<screen> -<userinput>cd /var/ftp/pub/mirror +<userinput>cd /var/www/mirror wget --mirror -np -nH --cut-dirs=<replaceable>2</replaceable> http://mirror.example.com/pub/mirror/fedora/linux/core/&FCVER;/</userinput> </screen>
@@ -665,7 +675,7 @@ </para>
<screen> -<userinput>rsync filehouse.example.org::files/misc/ /var/ftp/pub/misc/</userinput> +<userinput>rsync filehouse.example.org::files/misc/ /var/www/misc/</userinput> </screen>
<para> @@ -717,7 +727,7 @@ </caution> <screen> -<userinput>rsync -PHav mirror.example.org::fedora-linux-core/&FCVER;/ /var/ftp/pub/mirror/fedora/core/&FCVER;</userinput> +<userinput>rsync -PHav mirror.example.org::fedora-linux-core/&FCVER;/ /var/www/mirror/fedora/linux/core/&FCVER;</userinput> </screen>
<para id="rsync-n-switch"> @@ -877,11 +887,11 @@ <userinput>rsync -Pan --delete --exclude "**x86_64**" --exclude "**headers**" \ --exclude "**debug**" --exclude "**iso**" \ mirror.example.com::fedora-linux-core/&FCVER;/ \ - /var/ftp/pub/mirror/fedora/core/&FCVER;</userinput> + /var/www/mirror/fedora/core/&FCVER;</userinput> </screen>
</section> - + </section>
<section id="sn-maintenance"> @@ -951,638 +961,264 @@ </section>
<section id="sn-server-config"> - <title>Server Configuration Planning</title> - <para> - Decide what services your mirror will offer to clients. There are at least - three services useful for providing &FED; 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. - </para> - <para> - Install the <filename>vsftpd</filename> package for FTP services. Install - the <filename>httpd</filename> package to use the Apache HTTP server. Most - &FC; systems already have the <command>nfs-utils</command> package - installed, which contains the NFS server. - </para> - <para> - To start a service, use the <command>/sbin/service - <replaceable>service</replaceable> start</command> command. To enable that - server by default at boot time, use the <command>chkconfig - <replaceable>service</replaceable> on</command> command. - </para> - <para> - One recommended method is to download all mirrored files into - <filename>/var/ftp/pub</filename>, add a link in - <filename>/var/www/html</filename> that points to - <filename>/var/ftp/pub</filename>, and share out - <filename>/var/ftp/pub</filename> via NFS as well. FTP and HTTP services - do not require any further configuration to work properly. - <emphasis>However, you should evaluate your site's security needs before - enabling them.</emphasis> NFS service configuration is explained below - in <xref linkend="sn-nfs-config"/>. - </para> - <para> - To share out the public FTP area via HTTP, issue the following - command: - </para> - -<screen> -<userinput>ln -s /var/ftp/pub /var/www/html/pub</userinput> -</screen> - - <para> - Your clients may now visit any area of your mirror by using the URL - <replaceable>http://server.mydomain.org/pub/path</replaceable>. To create - an NFS share, add a line to <filename>/etc/exports</filename>. This - example shares out the &FC; &FCVER; i386 stock distribution with read-only - access for any host in the <computeroutput>mydomain.org</computeroutput> - domain. - </para> - -<screen> -<userinput>/var/ftp/pub/linux/fedora/core/&FCVER;/i386/os *.mydomain.org(ro,sync,root_squash)</userinput> -</screen> + <title>Server Configuration</title>
<para> - To reread the NFS server configuration files and export the new share, use - the following command: + This section gives guidance on setting up a HTTP (Web) server that + provides installation and update mirror services. </para>
-<screen> -<userinput>exportfs -ar</userinput> -</screen> - - <para> - Refer to <xref linkend="sn-nfs-config"/> for a list of commands for - starting services both on demand and at boot time. - </para> - - <section id="sn-solving-dependencies"> - <title>How to Solve Dependencies</title> - <para> - Every RPM package has a <emphasis>header</emphasis> 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 - <emphasis>dependencies</emphasis><indexterm> - <primary>dependencies</primary> - </indexterm>. A dependency is a requirement for one or more additional - packages. - </para> - <para> - 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. &FC; provides the - <command>yum</command> utility for solving these - dependencies automatically, providing an improved user experience. - </para> + <section id="sn-setting-up-apache"> + <title>Setting Up Apache</title>
<para> - The Yellow Dog Updater Modified, or - <emphasis>yum</emphasis><indexterm> <primary>yum</primary> - </indexterm>, is a Python-based system for computing and solving - RPM dependencies. A <command>yum</command> 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 <command>yum</command> - command relies on <command>rpm</command> functions to perform - many of the computations involved in the process. - </para> - <para> - A drawback to <command>yum</command> 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 - <command>yum</command> command can, of course, download many - megabytes of headers almost instantly on a standard Ethernet - LAN. The <command>yum</command> utility is the most popular - update method for &FC;. - </para> - <para> - For more information about using <command>yum</command>, refer - to <ulink url="http://fedora.redhat.com/docs/yum/"/>. + The HTTP service, provided by the Apache server in the + <filename>httpd</filename> package, is the easiest service to + configure. You can also use Apache to offer post-installation + functions such as updates or installing additional packages. To + install the <filename>httpd</filename> package, if you have not + already done so, use the following command: </para>
- </section> - - <section id="sn-repositories"> - <title>Configuring Repositories</title> - <para> - A <command>yum</command> <emphasis>repository</emphasis><indexterm> - <primary>repository</primary> - <secondary>yum</secondary> - </indexterm> is a collection of packages on a server which supports - <command>yum</command> clients. Repositories can serve both types of - clients if desired. - </para> +<screen> +<userinput>su - -c "yum install httpd"</userinput> +</screen>
<para> - To set up a <command>yum</command> 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 - <command>yum</command> it supports. It is permissible to have both kinds - of repository information in a single repository. - </para> - <para> - To support older <command>yum</command> clients, use the - <command>yum-arch</command> command. To support current - <command>yum</command> clients, use the - <command>createrepo</command> command. + Next, create a configuration file + <filename>/etc/httpd/conf.d/mirror.conf</filename> for your + mirror files. The following listing is an example: </para> - <important> - <title>Supporting &FC; 3 and beyond</title> - <para> - &FC; 3 ships with a newer version of <command>yum</command>. - To support &FC; 3 <command>yum</command> clients, you - <emphasis>must</emphasis> use <command>createrepo</command> on - your server's repositories. - </para> - </important>
- <section id="sn-yum-arch"> - <title><command>yum-arch</command></title> - <para> - A directory which supports older versions of <command>yum</command> - (before 2.2) is named <filename>headers</filename>. It is created by - using the command <command>yum-arch</command>, which is run against - the directory <emphasis>under which</emphasis> you want the - <filename>headers</filename> directory to appear. The - <command>yum-arch</command> program searches recursively through that - directory and any subdirectories for RPM packages, and includes them - in the header data. - </para> + <example> + <title>Apache 2.x configuration file for installation + mirror</title>
<screen> -<userinput>yum-arch -l -s /var/ftp/pub/linux/fedora/core/&FCVER;/i386/os</userinput> -</screen> - - <para> - The <command>-l</command> switch follows symbolic links. The - <command>-s</command> switch includes SRPMS (source RPM packages) in - the header list. The command above creates the <command>yum</command> - header cache in the directory - <filename>/var/ftp/pub/linux/fedora/core/&FCVER;/i386/os/headers</filename>. - </para> - </section> +<computeroutput><![CDATA[# The name at which the installation tree will be shared, +# followed by the name of the root directory of that tree. +Alias /mirror /var/www/mirror
- <section id="sn-createrepo"> - <title><command>createrepo</command></title> - <para> - The <command>createrepo</command> command creates repository - information to support newer versions of <command>yum</command> (and - possibly other repository client programs). The - <command>createrepo</command> command stores this data in a folder - named <filename>repodata</filename>. Just as with - <command>yum-arch</command>, run <command>createrepo</command> against - the directory <emphasis>under which</emphasis> you want the - <filename>repodata</filename> directory to appear. The - <command>createrepo</command> program also searches recursively for - RPM packages to include in the repository data. - </para> - <para> - The following command creates the repository data in the directory - <filename>/var/ftp/pub/linux/fedora/core/&FCVER;/i386/os/repodata</filename>. - </para> +# Share options for the installation tree. +# Only allow connections from the local host and machines +# whose IP addresses start with 192.168.1
-<screen> -<userinput>createrepo /var/ftp/pub/linux/fedora/core/&FCVER;/i386/os</userinput> +<Directory /var/www/mirror> + AllowOverride None + Order Deny,Allow + Deny from all + Allow from 127.0.0.1 192.168.1 + Options Indexes +</Directory>]]></computeroutput> </screen>
- <para> - 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. - </para> - - </section> - - <section id="sn-repository-locations"> - <title>Repository Locations</title> - <para> - Typically <command>yum-arch</command> or <command>createrepo</command> - is run against at least the following locations: - </para> - <itemizedlist> - <listitem> - <para> - The stock distribution; for example, - <filename>/var/ftp/pub/linux/fedora/core/&FCVER;/i386/os/</filename>. - For <command>yum-arch</command> use the <command>-l</command> and - <command>-s</command> options to follow the linked directory - <filename>SRPMS</filename> and include the source packages - therein. - </para> - </listitem> - <listitem> - <para> - Official updates to the distribution; for example, - <filename>/var/ftp/pub/linux/fedora/core/updates/&FCVER;/</filename>. - Once again, for <command>yum-arch</command> use - <command>-l</command> and/or <command>-s</command> if appropriate. - </para> - </listitem> - </itemizedlist> - </section> - - </section> - - <section id="sn-nfs-config"> - <title>Configuring NFS</title> - <para> - Some client-side utilities also resolve dependencies automatically. - These utilities require more detailed configuration of the client - workstation. For more information, see <xref - linkend="sn-client-config"/> 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. - </para> - <para> - 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 &FC; 2 and the stock distribution of &FC; 3. - </para> - <para> - The client side tools discussed later can use a directory of ISO images - or an exploded tree of package data (see <xref - linkend="sn-copying-original-distribution"/>). You may share out any or - all of these, provided your shares do not clash as described above. - </para> - -<!-- - - FIXME: Can system-config-packages use a directory of loopback-mounted - images like FTP/HTTP installs in anaconda? See additional FIXME below. - ---> + </example>
<para> - To share via NFS, edit the <filename>/etc/exports</filename> file. A - typical share, exported with read-only access for any host on any - network, looks like this: + To start the <command>httpd</command> service, use the following + command: </para>
<screen> -<computeroutput>/mnt/media *(ro,all_squash,async)</computeroutput> +<userinput>/sbin/service httpd start</userinput> </screen>
<para> - The <command>all_squash</command> 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 <command>async</command> option allows - asynchronous read/writes, which is not dangerous in this case because - the share is read-only. The <command>*</command> 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 - <filename>/etc/exports</filename> file by using the command <command>man - 5 exports</command>. - </para> - <important> - <title>Access control format</title> - <para> - Be certain that you do not have a space between the host specification - and the option listing in parentheses <computeroutput>( - )</computeroutput>. A space causes the NFS daemon to consider that - entry as <emphasis>two separate access controls</emphasis>. 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. - </para> - </important> - <para> - 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 &FED; folder (note the capitalization). For i386 - architectures: + To enable that server by default at boot time, use the following + command: </para>
<screen> -<userinput>/var/ftp/pub/linux/fedora/core/&FCVER;/i386/os *(ro,all_squash,async)</userinput> +<userinput>chkconfig httpd on</userinput> </screen>
<para> - To share a directory full of ISO images, export that directory: + Your clients may now visit any area of your mirror by using the + URL + http://<replaceable>server.mydomain.org</replaceable>/mirror/<replaceable>path</replaceable>. </para>
-<screen> -<userinput>/var/ftp/pub/linux/fedora/core/&FCVER;/i386/iso *(ro,all_squash,async)</userinput> -</screen> - -<!-- + </section>
- FIXME: Find out if this works first. + <section id="sn-solving-dependencies"> + <title>Solving Dependencies</title> + <para> + Every RPM package has a <emphasis>header</emphasis> 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 + <emphasis>dependencies</emphasis><indexterm> + <primary>dependencies</primary> </indexterm>. A dependency is a + requirement for one or more additional packages. + </para> + <para> + 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. &FC; provides the + <command>yum</command> utility for solving these dependencies + automatically, providing an improved user experience. + </para>
- <para> - To share a directory full of <emphasis>mounted</emphasis> ISO images, - export that directory. Do not share each mount point separately. The - mount points should be named <filename>disc1</filename>, - <filename>disc2</filename>, and so forth: - </para> + <para> + The Yellow Dog Updater Modified, or + <emphasis>yum</emphasis><indexterm> <primary>yum</primary> + </indexterm>, is a Python-based system for computing and solving + RPM dependencies. A <command>yum</command> 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 <command>yum</command> command relies on + <command>rpm</command> functions to perform many of the + computations involved in the process. + </para> + <para> + A drawback to <command>yum</command> 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 <command>yum</command> + command can download many megabytes of headers almost instantly on + a standard Ethernet LAN. The <command>yum</command> utility is the + most popular update method for &FC;. + </para> + <para> + For more information about using <command>yum</command>, refer to + <ulink url="http://fedora.redhat.com/docs/yum/"/>. + </para>
-<screen> -<userinput>/var/ftp/pub/linux/fedora/core/&FCVER;/i386/mounts *(ro,all_squash,async)</userinput> -</screen> + </section>
---> + <section id="sn-repositories"> + <title>Configuring Repositories</title> + <para> + A <command>yum</command> + <emphasis>repository</emphasis><indexterm> + <primary>repository</primary> <secondary>yum</secondary> + </indexterm> is a collection of packages on a server which + supports <command>yum</command> clients. Repositories can serve + both types of clients if desired. + </para>
+ <para> + To set up a <command>yum</command> 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 <command>yum</command> it supports. It is permissible + to have both kinds of repository information in a single + repository. + </para> + <para> + To support older <command>yum</command> clients, use the + <command>yum-arch</command> command. To support current + <command>yum</command> clients, use the + <command>createrepo</command> command. + </para> + <important> + <title>Supporting &FC; 3 and beyond</title> <para> - Once you have edited the <filename>/etc/exports</filename> file, make - sure that the NFS server is installed and started properly on the - mirror. The <filename>portmap</filename> and - <filename>nfs-utils</filename> packages must be installed. Configure - them to be turned on at boot time by default. + &FC; 3 ships with a newer version of <command>yum</command>. To + support &FC; 3 <command>yum</command> clients, you + <emphasis>must</emphasis> use <command>createrepo</command> on + your server's repositories. </para> + </important>
-<screen> -<userinput>/sbin/chkconfig portmap on -/sbin/chkconfig nfslock on -/sbin/chkconfig nfs on</userinput> -</screen> - + <section id="sn-yum-arch"> + <title><command>yum-arch</command></title> <para> - To check if any of these services are currently running, use the - <command>/sbin/service <replaceable>service_name</replaceable> - status</command> command: + A directory which supports older versions of + <command>yum</command> (before 2.2) is named + <filename>headers</filename>. It is created by using the command + <command>yum-arch</command>, which is run against the directory + <emphasis>under which</emphasis> you want the + <filename>headers</filename> directory to appear. The + <command>yum-arch</command> program searches recursively through + that directory and any subdirectories for RPM packages, and + includes them in the header data. </para>
<screen> -<userinput>/sbin/service portmap status -/sbin/service nfslock status -/sbin/service nfs status</userinput> +<userinput>yum-arch -l -s /var/www/mirror/fedora/linux/core/&FCVER;/i386/os</userinput> </screen>
<para> - To restart a service, use the <command>/sbin/service - <replaceable>service_name</replaceable> restart</command> command: + The <command>-l</command> switch follows symbolic links. The + <command>-s</command> switch includes SRPMS (source RPM + packages) in the header list. The command above creates the + <command>yum</command> header cache in the directory + <filename>/var/www/mirror/fedora/linux/core/&FCVER;/i386/os/headers</filename>. </para> + </section>
-<screen> -<userinput>/sbin/service portmap restart -/sbin/service nfslock restart -/sbin/service nfs restart</userinput> -</screen> - + <section id="sn-createrepo"> + <title><command>createrepo</command></title> + <para> + The <command>createrepo</command> command creates repository + information to support newer versions of <command>yum</command> + (and possibly other repository client programs). The + <command>createrepo</command> command stores this data in a + folder named <filename>repodata</filename>. Just as with + <command>yum-arch</command>, run <command>createrepo</command> + against the directory <emphasis>under which</emphasis> you want + the <filename>repodata</filename> directory to appear. The + <command>createrepo</command> program also searches recursively + for RPM packages to include in the repository data. + </para> <para> - If any service is not started, use the command <command>/sbin/service - <replaceable>service_name</replaceable> start</command> to start it, as - in the following examples: + The following command creates the repository data in the + directory + <filename>/var/www/mirror/fedora/linux/core/&FCVER;/i386/os/repodata</filename>. </para>
<screen> -<userinput>/sbin/service portmap start -/sbin/service nfslock start -/sbin/service nfs start</userinput> +<userinput>createrepo /var/www/mirror/fedora/linux/core/&FCVER;/i386/os</userinput> </screen>
<para> - To change your exports when the NFS service is already running, use the - command <command>/usr/sbin/exportfs -ar</command>. The command - <command>/usr/sbin/showmount -e</command> displays a list of the - current NFS exports on the local host machine. + You may not be able to foresee all the possible uses for your + server's repositories. You may have certain clients who update + their version of <command>yum</command> in a non-prescribed way. + To minimize problems for your clients, create both kinds of + repository data for any repositories. The extra repository + information is relatively small and will not affect your + mirror's proper function. </para>
</section>
- </section> - - <section id="sn-client-config"> - <title>Client Configuration</title> - <para> - 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 - <application>system-config-packages</application>, solving RPM package - installations at the command line, and pulling bug fix and security errata - updates. - </para> - - <section id="sn-system-config-packages"> - <title>Configuring <application>system-config-packages</application></title> + <section id="sn-repository-locations"> + <title>Repository Locations</title> <para> - Users typically run the - <application>system-config-packages</application> application from the - GUI menu, by choosing <guimenu>System Settings</guimenu>, - <guimenuitem>Add/Remove Applications</guimenuitem>. This program allows - the user to change the stock installation, provided no updates have - taken place yet that interfere. - </para> - <para> - Often, <application>system-config-packages</application> stops - functioning optimally after certain updates are installed. This is - because <application>system-config-packages</application> solves - dependencies based on the stock distribution. It is impossible for - <application>system-config-packages</application> to predict version - numbers of updates. If you intend to carry updates on your mirror, you - should be aware that installing certain updates causes - <application>system-config-packages</application> 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. - </para> - - <tip id="tp-s-c-p-stock-only"> - <title><command>yum</command> and - <application>system-config-packages</application></title> - <para> - If you plan to carry updates on your mirror, as most administrators - do, you will probably not use - <application>system-config-packages</application> much. Once the - installed package versions become out of sync with the original - distribution versions, <command>yum</command> becomes much - more useful. The preferred method for installing a package in that - case would be <command>yum install - <replaceable>package_name</replaceable></command>. See <xref - linkend="sn-solving-dependencies"/> for more information. - </para> - </tip> - - <section id="sn-autofs"> - <title>Setting Up <command>autofs</command></title> - <para> - The <command>autofs</command><indexterm> - <primary>autofs</primary> - </indexterm> facility allows a &FC; system to mount file systems on - demand. The <filename>/etc/auto.master</filename> file contains an - <emphasis>automounter map</emphasis><indexterm> - <primary>automounter map</primary> - </indexterm> - <indexterm> - <primary>map</primary> - <secondary>automounter</secondary> - <see>automounter map</see> - </indexterm>. On &FC;, 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 <filename>/etc/auto.master</filename> is - shown below: - </para> - -<screen> -<computeroutput>/misc /etc/auto.misc --timeout=60</computeroutput> -</screen> - - <para> - 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. - </para> - <para> - The <filename>/etc/auto.misc</filename> file contains entries similar - to the following example. - </para> - -<screen> -<computeroutput>remote -ro,soft,intr host.foobar.org:/pub</computeroutput> -</screen> - - <para> - This line is contained in the automounter map file for the - <filename>/misc</filename> 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 <command>mount</command> 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 - <filename>/misc/remote</filename>, an NFS mount is automatically - performed. The user's command appears to hesitate, depending on how - fast the NFS server responds. Then <filename>/misc/remote</filename> - appears to be full of whatever content is on host.foobar.org in the - <filename>/pub</filename> NFS share. - </para> - <para> - You can use this function to provide NFS access to the stock - distribution for &FC;. Choose a directory to map in the - <filename>/etc/auto.master</filename> file, and match it to a - corresponding automounter map file. The easiest way to do this is to - simply remove the comment <computeroutput>#</computeroutput> from the - front of the line attaching <filename>/misc</filename> to - <filename>/etc/auto.misc</filename>. The default timeout should be - sufficient. - </para> - <para> - Make an entry in <filename>/etc/auto.misc</filename> 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 - &FC; that you have available on the local mirror. - </para> - -<screen> -<userinput>fc&FCVER; -ro,soft,intr mirror.mydomain.org:/var/ftp/pub/linux/fedora/core/&FCVER;</userinput> -</screen> - - <para> - Now restart the <command>autofs</command> service: - </para> - -<screen> -<userinput>/sbin/service autofs restart</userinput> -</screen> - - <para> - To access the stock distribution for &FC; &FCVER; the user can simply - type <command>cd /misc/fc&FCVER;</command>. The share is automatically - mounted and the files simply appear in that local directory. - </para> - - </section> - - <section id="sn-shared-desktop-s-c-p"> - <title><filename>/usr/share/applications/system-config-packages</filename></title> - <para> - Now that <command>autofs</command> has been configured, your client - workstations need to be configured so that - <application>system-config-packages</application> points to the - mirror's NFS share. Edit the - <filename>/usr/share/applications/system-config-packages</filename> - file's <command>Exec=</command> line to add a switch pointing to the - share: - </para> - -<screen> -<userinput>Exec=/usr/bin/system-config-packages --tree=/misc/fc&FCVER;/i386/os</userinput> -</screen> - - <para> - When users choose <guimenu>System Settings</guimenu>, - <guimenuitem>Add/Remove Applications</guimenuitem> from the GUI main - menu, the system now automatically resolves package dependencies from - the mirror. The restrictions stated above in <xref - linkend="tp-s-c-p-stock-only"/> apply. - </para> - </section> - - <section id="sn-rpm-aid"> - <title>The <command>rpm --aid</command> Switch</title> - <para> - The <command>--aid</command> switch for the <command>rpm</command> - command also automatically solves dependencies. It performs this - function based on the <filename>rpmdb-fedora</filename> package. That - package is a preset database for a system that has every RPM package - in the &FC; distribution installed. Even if a system does not - <emphasis>itself</emphasis> have every package installed, it can - consult the <filename>rpmdb-fedora</filename> package database to see - what such a system <emphasis>would</emphasis> look like. By using the - <command>--aid</command> switch, clients can issue a single - <command>rpm --install --aid</command> command against an original - &FC; package, and have all dependencies automatically installed as - well. - </para> - <para> - Two steps are required for this process. First, install the - <filename>rpmdb-fedora</filename> package: - </para> - -<screen> -<userinput>rpm --install /misc/fc&FCVER;/i386/os/&FED;/RPMS/rpmdb-fedora-*.rpm</userinput> -</screen> - - <para> - Then, edit the file <filename>/etc/rpm/macros.solve</filename>, which - is part of the <filename>rpmdb-fedora</filename> package. Change the - following lines to enable package resolution: - </para> - -<screen> -<computeroutput>%_solve_pkgsdir /misc/fc&FCVER;/i386/os/&FED;/RPMS/ -%_solve_name_fmt %{?_solve_pkgsdir}%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm</computeroutput> -</screen> - - <para> - Users now issue a single command to install any package from - the stock distribution, and all dependencies are solved for - them. For example: - </para> - -<screen> -<userinput>rpm --install --aid /misc/fc&FCVER;/i386/os/&FED;/RPMS/kdeutils-*.rpm</userinput> -</screen> - - <para> - If a user forgets the <command>--aid</command> switch, they still - receive hints. Normally <command>rpm</command> displays a slightly - cryptic list of capability requirements, instead of straightforward - package names. If you edit <filename>/etc/rpm/macros.solve</filename> - as shown, <command>rpm</command> displays a list of required package - names instead. - </para> - <para> - Package dependency solutions using <command>--aid</command> are also - restricted as shown above in <xref linkend="tp-s-c-p-stock-only"/>. - </para> - - </section> + Typically <command>yum-arch</command> or + <command>createrepo</command> is run against at least the + following locations: + </para> + <itemizedlist> + <listitem> + <para> + The stock distribution; for example, + <filename>/var/www/mirror/fedora/linux/core/&FCVER;/i386/os/</filename>. + For <command>yum-arch</command> use the + <command>-l</command> and <command>-s</command> options to + follow the linked directory <filename>SRPMS</filename> and + include the source packages therein. + </para> + </listitem> + <listitem> + <para> + Official updates to the distribution; for example, + <filename>/var/mirror/fedora/linux/core/updates/&FCVER;/</filename>. + Once again, for <command>yum-arch</command> use + <command>-l</command> and/or <command>-s</command> if + appropriate. + </para> + </listitem> + </itemizedlist> + </section>
</section>
docs-commits@lists.fedoraproject.org