rpm-guide rpm-guide-management-software-en.xml,NONE,1.1

Stuart Ellis (elliss) fedora-docs-commits at redhat.com
Tue Oct 4 01:54:12 UTC 2005


Author: elliss

Update of /cvs/docs/rpm-guide
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv681

Added Files:
	rpm-guide-management-software-en.xml 
Log Message:



--- NEW FILE rpm-guide-management-software-en.xml ---
<!-- $Id: --> 
<chapter id="ch-management-software">
<title>RPM Management Software</title>

  <para>
    Copyright (c) 2005 by Eric Foster-Johnson. This material may be
    distributed only subject to the terms and conditions set forth in
    the Open Publication License, v1.0 or later (the latest version is
    presently available at http://www.opencontent.org/openpub/).
  </para>

  <para/>

  <para>
    In This Chapter
  </para>

  <para>
    *Finding packages in RPM format
  </para>

  <para>
    *Graphical tools to manage RPM packages
  </para>

  <para>
    *Extending RPM management with additional tools
  </para>

  <para>
    You can find a variety of software packages to ease the work of
    managing RPM-based systems. These utilities can help you find a
    specific software application packaged using RPM or search through a
    collection of RPM-packaged software to locate applications with
    specific features. Similarly, several utilities provide features to
    ease long-term system-management tasks. These applications provide
    features such as automatic updating of existing installed software
    with more recent versions or simplification of software installation
    by automating installation of any required software dependencies.
  </para>

  <para>
    This chapter covers a number of tools for finding packages in RPM
    format, as well as tools to help manage the RPMs on your system.
  </para>

  <sect1>
    <title>Locating RPMs</title>
    <para>
      RPM provides a powerful tool for managing software installed on a
      system. With a single command, an entire application can be
      installed on the system in a ready-to-run configuration. With a
      different command, the entire application can be removed without
      having manually to track down all of the associated files
      scattered throughout the hard drive. For RPM to work, however, the
      software being managed must be packaged in the proper RPM format.
      RPM packages can be easily prepared if necessary, but you can save
      time by using the wide variety of software already available in
      the RPM format. The only trick to using this RPM-packaged software
      is finding it.
    </para>
    <para>
      As you start to search for RPM packages on the Internet, you’ll
      find thousands of packages available. Many of these packages are
      built specifically for various Linux distributions, such as
      Conectiva, SuSE, Red Hat, or Mandrake. In many cases, the Linux
      distribution won’t matter, but in general it's best to download
      packages built for your version of Linux, such as Red Hat.
    </para>
    <para>
      Note
    </para>
    <para>
      Although the examples in this book assume Red Hat Linux as a base,
      just about everything applies to all versions of Linux that use
      the RPM system, unless noted otherwise.
    </para>
    <para>
      Internet search engines are popular, but they aren’t very
      helpful for finding RPM packages, especially because lots of Web
      pages have the term rpm (including those covering revolutions per
      minute). A more efficient approach is to use one of the
      RPM-specific Internet search tools such as rpmfind.
    </para>
    <sect2>
      <title>rpmfind and rpm2html</title>
      <para>
        One popular free tool for locating RPMs is rpmfind, written by
        Daniel Veillard. This tool provides a command-line utility that
        can search for packages by name or description, displaying or
        optionally downloading any matching packages it finds. It can
        even provide a list of the dependencies that those matching
        packages require to run and can download those required
        dependencies as well.
      </para>
      <para>
        When searching for packages, rpmfind can search both the
        software already installed on the local system and remote
        databases, including the databases located at
        http://rpmfind.net/.
      </para>
      <para>
        Note
      </para>
      <para>
        The databases at http://rpmfind.net/ are, in turn, created by
        another utility: rpm2html. Both are covered in the sections
        following.
      </para>
      <para>
        Commonly, rpmfind is used to search for packages by name, though
        it can be used to search package descriptions for key words. For
        example, I might want to find new e-mail clients to install on
        my system. I happen to know that one popular Linux e-mail client
        is Ximian’s evolution, so I search for that.
      </para>
      <para>
        The basic syntax for rpmfind follows:
      </para>
      <para>
        rpmfind package_name
      </para>
      <para>
        For example, to search for evolution, use a command like the
        following:
      </para>
      <para>
        $ rpmfind evolution
      </para>
      <para>
        Resource evolution already installed
      </para>
      <para>
        $
      </para>
      <para>
        Before accessing the Internet, rpmfind searches my local system
        and finds that I already have evolution installed, so it does
        not even bother searching for copies to download. It looks like
        I’m forgetful, not remembering that I already have evolution
        installed. At this point, I might realize that I already have
        the software I need, or I might decide to search for a similar
        application, such as exmh, another popular Unix e-mail client.
      </para>
      <para>
        To search for exmh (which in this example has not been
        installed), use a command like the following:
      </para>
      <para>
        $ rpmfind exmh
      </para>
      <para>
        Installing exmh will require 7301 KBytes
      </para>
      <para/>
      <para>
        ### To Transfer:
      </para>
      <para>
        ftp://ftp.redhat.com/pub/redhat/linux/7.2/en/os/i386/RedHat/RPMS//nmh-1.0.4-9.i3
      </para>
      <para>
        86.rpm
      </para>
      <para>
        ftp://ftp.redhat.com/pub/redhat/linux/7.2/en/os/i386/RedHat/RPMS//exmh-2.4-2.noarch.rpm
      </para>
      <para>
        Do you want to download these files to /tmp [Y/n/a/i] ? : a
      </para>
      <para>
        transferring
      </para>
      <para>
        ftp://ftp.redhat.com/pub/redhat/linux/7.2/en/os/i386/RedHat/RPMS//nmh-1.0.4-9.i386.rpm
      </para>
      <para>
        saving to /tmp/nmh-1.0.4-9.i386.rpm
      </para>
      <para>
        transferring
      </para>
      <para>
        ftp://ftp.redhat.com/pub/redhat/linux/7.2/en/os/i386/RedHat/RPMS//exmh-2.4-2.noarch.rpm
      </para>
      <para>
        saving to /tmp/exmh-2.4-2.noarch.rpm
      </para>
      <para>
        rpm -U /tmp/nmh-1.0.4-9.i386.rpm /tmp/exmh-2.4-2.noarch.rpm
      </para>
      <para>
        $
      </para>
      <para>
        Here, rpmfind searches my local system for exmh. Since exmh is
        not installed there, rpmfind searches the databases at
        http://rpmfind.net/ and does two things: it finds exmh, and it
        learns that exmh depends upon another package: nmh. After
[...1729 lines suppressed...]
        this reason, apt can only be used to update systems from
        apt-capable repositories.
      </para>
      <para>
        Although apt was created by the Debian Project and designed for
        dpkg-format software packages, nothing about apt requires that
        it inherently be usable only with dpkg-format packages. Because
        of this, and because of its powerful capabilities, Conectiva, a
        Brazilian Linux distribution vendor (www.conectiva.com),
        extended apt to support management of RPM packages in addition
        to dpkg packages. Conectiva’s work, commonly referred to as
        apt-rpm, makes the apt client software available for use on any
        RPM-based Linux distribution. Conectiva also provides its
        customers with access to apt-capable FTP servers. A related
        project, apt4rpm (http://apt4rpm.sourceforge.net/), supplies the
        necessary utilities that can be used to make any RPM repository
        apt-capable. By creating apt-capable servers using apt4rpm and
        then installing apt-rpm on the client systems, any RPM-based
        distribution, such as Red Hat Linux, Mandrake Linux, Caldera/SCO
        OpenLinux, or SuSE Linux, can then be easily managed using apt.
      </para>
      <para>
        Note
      </para>
      <para>
        The freshrpms.net site, mentioned previously, provides a touted
        apt repository.
      </para>
      <para>
        Administrators managing multiple dispersed machines as well as
        those used to Debian administration often find it useful to
        configure their machines to use apt; its dependency tracking is
        far better than any other tool, except for Red Hat’s
        up2date/RHN combination. To use apt, administrators must install
        it on their machines and have access to an apt-capable RPM
        repository for the distribution they use. Several public FTP
        sites that support apt are now available for most of the major
        RPM-based distributions. Also, the administrator can create
        another apt-capable repository.
      </para>
      <para>
        Configuration of machines to use apt is simple. The apt and
        libapt RPMs simply need to be installed. Although binaries are
        sometimes available, the best success can usually be obtained by
        building binary RPMs from the latest Conectiva apt SRPM (source
        RPM), available at
        ftp://ftp.conectiva.com/pub/conectiva/EXPERIMENTAL/apt/.
      </para>
      <para>
        Once apt and libapt RPMs are installed, the sources.list file in
        /etc/apt needs to be modified to reference the apt-capable
        software site that will be used. For example, to configure a
        machine to access the apt-capable Red Hat Linux 7.2 software
        distributed by the Tuxfamily.org server, the
        /etc/apt/sources.list file needs to list:
      </para>
      <para>
        rpm http://apt-rpm.tuxfamily.org/apt redhat-7.2-i386/redhat os
      </para>
      <para>
        rpm http://apt-rpm.tuxfamily.org/apt redhat-updates-7.2/redhat
        os
      </para>
      <para>
        These two lines, respectively, access the Red Hat Linux 7.2 and
        Red Hat Linux 7.2 errata RPMs being served by the system
        apt-rpm.tuxfamily.org. If you also want access to source RPMs,
        the following lines are necessary as well.
      </para>
      <para>
        rpm-src http://apt-rpm.tuxfamily.org/apt redhat-7.2-i386/redhat
        os
      </para>
      <para>
        rpm-src http://apt-rpm.tuxfamily.org/apt
        redhat-updates-7.2/redhat os
      </para>
      <para>
        In addition to, or instead of, using public apt-capable servers,
        many sites want to create their own apt servers. If apt is being
        used to manage all the machines in the enterprise, a custom apt
        server might be needed that contains apt-accessible RPMs of all
        the custom software used in the enterprise. This can be done
        using the tools provided by the apt4rpm package
        (http://apt4rpm.sourceforge.net).
      </para>
      <para>
        Once apt has been installed on clients, and the clients have
        been configured to access an apt-capable server, keeping systems
        updated is simple. The command apt-get update updates the client
        system’s apt database of available software, after which the
        command apt-get upgrade upgrades all currently installed
        software to the latest version available in the software
        repository. By listing a site that provides vendor errata
        updates in /etc/apt/sources.list and then setting up a nightly
        cron job to run the apt-get upgrade command, administrators can
        be sure that client systems always have the latest errata
        installed. You can use a similar technique to ensure that all
        client systems are always up to date with the latest custom
        in-house applications. To do this, set up your own apt server
        and ensure that the latest custom applications are placed on the
        apt server.
      </para>
      <para>
        In addition, apt simplifies interactive installation of RPMs on
        systems that are using it. The command apt-get install package
        retrieves the named RPM from the apt-capable software repository
        and installs it. If the package requires any dependencies that
        are not already resolved, apt will ask for confirmation, then
        download and install the package and all dependencies.
        Similarly, apt-get remove package uninstalls the named RPM. If
        any other packages depend on it, it will prompt for
        confirmation, then uninstall the named RPM and all of its
        dependencies.
      </para>
      <para>
        In addition to these command-line utilities, several graphical
        front-end tools for manipulating apt are currently being ported
        for use with apt-rpm. Because of its ease of use for automating
        installation of system errata and necessary custom software, and
        because of the excellent dependency tracking it provides for
        interactive installation and uninstallation of software, apt-rpm
        can be excellent for managing RPM-based systems.
      </para>
    </sect2>
    <sect2>
      <title>The poldek</title>
      <para>
        Also similar to the Debian apt tool, a utility called the poldek
        works like apt-get. The poldek was designed to quickly scan
        through dependencies and install a number of packages at once.
        You can specify all the packages to install in a file.
      </para>
      <para>
        The poldek automatically downloads any needed dependencies. The
        poldek can download files over the Internet and also help create
        the packages for storage on CD-ROMs. The poldek optimizes the
        set of packages to reduce the number of times users have to
        switch CDs.
      </para>
      <para>
        Cross Reference
      </para>
      <para>
        For more on the poldek, see poldek.pld.org.pl.
      </para>
    </sect2>
  </sect1>

  <sect1>
    <title>Summary</title>
    <para>
      This chapter has covered a number of tools for finding packages in
      RPM format, as well as tools to help manage the RPMs on your
      system. The rpm command does a great job of installing, removing,
      and upgrading packages. You can use it or choose from one of the
      many graphical RPM management tools shown in this chapter.
    </para>
    <para>
      The rpmfind utility helps find RPM packages on Internet servers.
      You can use rpmfind to find the latest version of the packages
      installed on your system.
    </para>
    <para>
      The Nautilus file manager allows you to browse files on disk, and
      it installs any RPM files you double-click.
    </para>
    <para>
      Red Hat Linux 8 comes with a new package-management tool available
      from the System Settings menu. Be careful with this tool, though,
      as it automatically installs--and removes--dependent packages.
    </para>
    <para>
      AutoRPM and AutoUpdate provide utilites that you can run
      periodically to ensure that your systems are up to date. The Red
      Hat Network and up2date also provides this capability.
    </para>
    <para>
      The Debian GNU/Linux apt system provides many of the same
      capabilities as RPM, along with the network-updating capabilities
      of up2date and the Red Hat Network. You can use special apt
      packages that adapt apt for RPM-based Linux distributions and get
      the best of both the RPM system and the apt system.
    </para>
    <para>
      The next chapter starts the major section on creating RPMs. The
      RPM system reduces a lot of the burden of administering Linux
      systems. You can take advantage of this when building any sort of
      software for distribution--or even when managing your own system.
    </para>
  </sect1>
</chapter>
<!--
Local variables:
mode: xml
sgml-parent-document:("rpm-guide-en.xml" "book" "chapter")
fill-column: 72
End:
-->





More information about the Fedora-docs-commits mailing list