From fedora-docs-commits at redhat.com Wed Jun 10 15:28:44 2015 Content-Type: multipart/mixed; boundary="===============4036140478557431003==" MIME-Version: 1.0 From: fedora-docs-commits at redhat.com To: docs-commits at lists.fedoraproject.org Subject: rpm-guide rpm-guide-management-software-en.xml,NONE,1.1 Date: Mon, 03 Oct 2005 21:54:12 -0400 Message-ID: <200510040154.j941sCMU000704@cvs-int.fedora.redhat.com> --===============4036140478557431003== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 --- = RPM Management Software 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/). In This Chapter *Finding packages in RPM format *Graphical tools to manage RPM packages *Extending RPM management with additional tools 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. 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. Locating RPMs 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. As you start to search for RPM packages on the Internet, you=EF=BF=BD= =EF=BF=BD=EF=BF=BDll 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=EF=BF=BD=EF=BF=BD=EF=BF=BDt matter, but in general i= t's best to download packages built for your version of Linux, such as Red Hat. Note 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. Internet search engines are popular, but they aren=EF=BF=BD=EF=BF=BD= =EF=BF=BDt 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. rpmfind and rpm2html 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. 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/. Note The databases at http://rpmfind.net/ are, in turn, created by another utility: rpm2html. Both are covered in the sections following. 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=EF=BF=BD=EF=BF=BD=EF=BF=BDs evolution, so I search for th= at. The basic syntax for rpmfind follows: rpmfind package_name For example, to search for evolution, use a command like the following: $ rpmfind evolution Resource evolution already installed $ 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=EF=BF=BD=EF=BF=BD=EF=BF=BDm forgetful, not remembering that I alr= eady 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. To search for exmh (which in this example has not been installed), use a command like the following: $ rpmfind exmh Installing exmh will require 7301 KBytes ### To Transfer: ftp://ftp.redhat.com/pub/redhat/linux/7.2/en/os/i386/RedHat/RPMS//n= mh-1.0.4-9.i3 86.rpm ftp://ftp.redhat.com/pub/redhat/linux/7.2/en/os/i386/RedHat/RPMS//e= xmh-2.4-2.noarch.rpm Do you want to download these files to /tmp [Y/n/a/i] ? : a transferring ftp://ftp.redhat.com/pub/redhat/linux/7.2/en/os/i386/RedHat/RPMS//n= mh-1.0.4-9.i386.rpm saving to /tmp/nmh-1.0.4-9.i386.rpm transferring ftp://ftp.redhat.com/pub/redhat/linux/7.2/en/os/i386/RedHat/RPMS//e= xmh-2.4-2.noarch.rpm saving to /tmp/exmh-2.4-2.noarch.rpm rpm -U /tmp/nmh-1.0.4-9.i386.rpm /tmp/exmh-2.4-2.noarch.rpm $ 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. 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=EF=BF=BD=EF=BF=BD=EF=BF=BDs work, commo= nly 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. Note The freshrpms.net site, mentioned previously, provides a touted apt repository. 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=EF=BF=BD=EF=BF= =BD=EF=BF=BDs 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. 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/. 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: rpm http://apt-rpm.tuxfamily.org/apt redhat-7.2-i386/redhat os rpm http://apt-rpm.tuxfamily.org/apt redhat-updates-7.2/redhat os 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. rpm-src http://apt-rpm.tuxfamily.org/apt redhat-7.2-i386/redhat os rpm-src http://apt-rpm.tuxfamily.org/apt redhat-updates-7.2/redhat os 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). 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=EF=BF=BD=EF=BF=BD=EF=BF=BDs apt database of available softwa= re, 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. 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. 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. The poldek 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. 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. Cross Reference For more on the poldek, see poldek.pld.org.pl. Summary 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. 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. The Nautilus file manager allows you to browse files on disk, and it installs any RPM files you double-click. 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. 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. 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. 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. --===============4036140478557431003==--