next up previous contents
Next: The Yum Client Up: Creating a Simple Yum Previous: Yummify the Repository   Contents

Export the Repository to the Client(s)

As noted above, yum can use repositories provided to the clients via the web, via ftp, or via any filesystem path (including those provided by a variety of network base filesystems). There are therefore many choices for servers, and it is far beyond the scope of this article to describe how to set each possibility up. We will therefore assume that you are running a straightforward apache webserver and need to export the Fedora path above so that it becomes http://my.webserver.org/fedora on your web server.

To do this, add a section such as:

<Directory "/var/www/fedora">
    Options Indexes Includes FollowSymLinks
    AllowOverride ALL
    Order allow,deny
    Allow from all
</Directory>
to /etc/httpd/conf/httpd.conf in an appropriate place and restart the webserver:
  # /etc/init.d/httpd restart

Then, as a preview of sorts, create a yum.conf entry that points to this repository:

  [fedora-core]
  name = Fedora Core
  baseurl=http://www.myserver.org/fedora/
  gpgcheck=1
and set it aside for the next section.

Note that the gpgcheck=1 line causes yum to check signatures of all the files it looks at, which is a good thing to do, at least if you wish to minimize the risk of installing a trojanned RPM that might have been inserted into one of the repositories you manage or mirror on every system in your enterprise.

Note also that there can be no leading whitespace in /etc/yum.conf - leading whitespace is interpreted by the configuration file parser as a line continuation (which is in fact used to add more than one baseurl for fallback purposes).

Warning! If the repository is a locally mounted filesystem, remember to include the leading path slash for the URL, as in

  baseurl=file:///path/to/repository
Forgetting to do this is a fairly common cause of initial failure.

That's all there is to it!

In some ways yum is a tool designed for systems administrators (even if they care for only one system) which is why this article started by describing the setup of a yummified repository. Once you have a repository, however, it is time to learn to use yum itself as an installation/maintenance client for RPM repositories. This is the topic of the next section.


next up previous contents
Next: The Yum Client Up: Creating a Simple Yum Previous: Yummify the Repository   Contents
Robert G. Brown 2003-12-17