Managing Software with Yum
Total Page:16
File Type:pdf, Size:1020Kb
Fedora Core 4 Managing software with yum Stuart Ellis Edited by Paul W. Frields Copyright © 2005 Red Hat, Inc. and others. The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. The original authors of this document, and Red Hat, designate the Fedora Project as the "Attribution Party" for purposes of CC-BY-SA. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version. Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law. Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries. For guidelines on the permitted uses of the Fedora trademarks, refer to https:// fedoraproject.org/wiki/Legal:Trademark_guidelines. Linux® is the registered trademark of Linus Torvalds in the United States and other countries. Java® is a registered trademark of Oracle and/or its affiliates. XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries. All other trademarks are the property of their respective owners. 1. Introduction ............................................................................................................................. 2 1.1. Purpose ....................................................................................................................... 2 1.2. Audience ..................................................................................................................... 2 1.3. Using This Document ................................................................................................... 2 1.4. Additional Resources .................................................................................................... 3 1 Managing software with yum 2. Software Management Concepts ............................................................................................. 4 2.1. About Packages ........................................................................................................... 4 2.2. About Repositories ....................................................................................................... 4 2.3. About Dependencies .................................................................................................... 5 2.4. Understanding Package Names .................................................................................... 5 3. Software Management Tools in Fedora Core ............................................................................ 6 4. Managing Software with yum ................................................................................................... 7 4.1. Installing New Software with yum .................................................................................. 8 4.2. Updating Software with yum .......................................................................................... 9 4.3. Removing Software with yum ........................................................................................ 9 5. Searching for Packages with yum .......................................................................................... 10 5.1. Searching by Package Name and Attributes ................................................................ 10 5.2. Advanced Searches ................................................................................................... 10 5.3. Understanding Matches .............................................................................................. 11 6. Updating Your System with yum ............................................................................................. 11 6.1. Automatically Updating Your System ........................................................................... 12 7. Using Other Software Repositories ........................................................................................ 12 7.1. Adding a Repository as a Package Source .................................................................. 12 7.2. Manually Authorizing Package Sources ....................................................................... 13 7.3. Understanding Repository Compatibility ....................................................................... 13 8. Installing Software from an Isolated Package .......................................................................... 14 9. Maintaining yum .................................................................................................................... 15 9.1. Disabling or Removing Package Sources .................................................................... 15 9.2. Clearing the yum Caches ............................................................................................ 15 10. Using yum with a Proxy Server ............................................................................................ 15 10.1. Configuring Proxy Server Access .............................................................................. 16 10.2. Configuring Proxy Server Access for a Single User .................................................... 16 11. Acknowledgements .............................................................................................................. 17 Index 17 1. Introduction 1.1. Purpose This document presents basic concepts of software management on Fedora systems. It outlines the major functions of yum, the recommended software management tool for Fedora. 1.2. Audience This document is intended for Fedora users of all levels of experience. 1.3. Using This Document This document is a reference for using yum. You may wish to read some or all of the sections, depending upon your needs and level of experience. If you are a new user, read the Section 2, “Software Management Concepts” before using yum for the first time. Experienced Linux users should start with Section 4, “Managing Software with yum”. 2 Additional Resources Previous Versions of Fedora Core This document describes the configuration of yum on Fedora Core 4 systems. You must perform the additional step noted in Section 7.2, “Manually Authorizing Package Sources” to enable yum on Fedora Core 3. Most of the examples in this document use the package tsclient, which is included with Fedora Core. The tsclient package provides an application for remote desktop access. If you install it successfully you may start the application by choosing Applications → Internet → Terminal Server Client. To use the examples, substitute the name of the relevant package for tsclient. The example commands for Fedora package groups use the MySQL Database group. Avoid Logging in with the Root Account You do not need to log in with the root account in order to manage your Fedora system. All of the commands shown in this tutorial that require root access will prompt you for the root password. The example terminal commands use su -c to provide this facility. 1.4. Additional Resources The yum utility has features and options not discussed in this document. Read the man pages for yum(8) and yum.conf(5) to learn more, using the following commands: man yum man yum.conf Other useful yum resources on the Internet include: Project web site http://linux.duke.edu/projects/yum/ Users mailing list https://lists.dulug.duke.edu/mailman/listinfo/yum/ Development mailing list https://lists.dulug.duke.edu/pipermail/yum-devel/ Check Bugzilla First If you encounter a persistent error with a specific operation, visit http://bugzilla.redhat.com and review the bug reports for the package or packages involved. An error in a package may cause all yum operations that rely on that package to fail. Please file bug reports for Fedora packages, including yum, on this Bugzilla web site. 3 Managing software with yum 2. Software Management Concepts 2.1. About Packages Fedora software and documentation is supplied in the form of files called RPM packages. Each package is a compressed archive containing product information, program files, icons, documentation and management scripts. Management applications use these files to safely locate, install, update and remove software. For example, the Fedora installation process uses the packages supplied with Fedora Core to build or upgrade a system to your requirements. Packages also include a digital signature to prove their source. Software management utilities verify this digital signature by using a GPG public key. The yum and rpm utilities share a common keyring that stores all of the public keys for approved package sources. The system administrator configures these approved package sources. All Fedora Packages are Open Source Software All of the software provided by the Fedora Project is open source software. You may download and install Fedora packages on as many systems as desired. 2.2. About Repositories A repository is a prepared directory or web site that contains software packages and index files. Software management utilities such as yum automatically locate and obtain the correct RPM packages from these repositories. This method frees you from having to manually find and install new applications or updates. You may use a single command to update