From Fedora Project Wiki
fp-wiki>ImportUser
(Imported from MoinMoin)
 
m (add category)
 
(3 intermediate revisions by 2 users not shown)
Line 8: Line 8:
* To remove unwanted software from your system
* To remove unwanted software from your system


{| border="1"
{{Admon/important | Installing Software from a Package File | The <code>yum</code> commands shown in this section use repositories as package sources. Refer to [[Docs/Drafts/SoftwareManagementGuide/IsolatedInstall| Section 8, “Installing Software from an Isolated Package”]]  for details of using <code>yum</code> to install software from an individual package file.}}
|-
| {{Template:Important}} '''Installing Software from a Package File'''
|-
| The <code>yum</code> commands shown in this section use repositories as package sources. Refer to [[Docs/Drafts/SoftwareManagementGuide/IsolatedInstall| Section 8, “Installing Software from an Isolated Package”]]  for details of using <code>yum</code> to install software from an individual package file.
|}


To use <code>yum</code>, specify a function and one or more packages or package groups. Each section below gives some examples.
To use <code>yum</code>, specify a function and one or more packages or package groups. Each section below gives some examples.
Line 43: Line 38:
Review the list of changes, and then press '''[y] ''' to accept and begin the process. If you press '''[N] ''' or '''[Enter] ''', <code>yum</code> does not download or change any packages.
Review the list of changes, and then press '''[y] ''' to accept and begin the process. If you press '''[N] ''' or '''[Enter] ''', <code>yum</code> does not download or change any packages.


{| border="1"
{{Admon/note | Package Versions | The <code>yum</code> utility only displays and uses the newest version of each package, unless you specify an older version.}}
|-
| {{Template:Note}} '''Package Versions'''
|-
| The <code>yum</code> utility only displays and uses the newest version of each package, unless you specify an older version.
|}


The <code>yum</code> utility also imports the repository public key if it is not already installed on the rpm keyring.
The <code>yum</code> utility also imports the repository public key if it is not already installed on the rpm keyring.
Line 66: Line 56:
To ensure that downloaded packages are genuine, <code>yum</code> verifies the digital signature of each package against the public key of the provider. Once all of the packages required for the transaction are successfully downloaded and verified, <code>yum</code> applies them to your system.
To ensure that downloaded packages are genuine, <code>yum</code> verifies the digital signature of each package against the public key of the provider. Once all of the packages required for the transaction are successfully downloaded and verified, <code>yum</code> applies them to your system.


{| border="1"
{{Admon/note | Transaction Log | Every completed transaction records the affected packages in the log file <code>/var/log/yum.log</code>. You may only read this file with ''root'' access.}}
|-
| {{Template:Note}} '''Transaction Log'''
|-
| Every completed transaction records the affected packages in the log file <code>/var/log/yum.log</code>. You may only read this file with ''root'' access.
|}


== 4.1. Installing New Software with yum ==
== 4.1. Installing New Software with yum ==
Line 87: Line 72:
Enter the password for the ''root'' account when prompted.
Enter the password for the ''root'' account when prompted.


{| border="1"
{{Admon/important | New Services Require Activation | When you install a service, Fedora does not activate or start it. To configure a new service to run on bootup, choose ''System → Administration → Services'' from the top desktop panel, or use the <code>chkconfig</code> and <code>service</code> command-line utilities.}}
|-
| {{Template:Important}} '''New Services Require Activation'''
|-
| When you install a service, Fedora does not activate or start it. To configure a new service to run on bootup, choose ''System → Administration → Services'' from the top desktop panel, or use the <code>chkconfig</code> and <code>service</code> command-line utilities.
|}


{{Anchor|updating_software}}
{{Anchor|updating_software}}
Line 103: Line 83:
Enter the password for the ''root'' account when prompted.
Enter the password for the ''root'' account when prompted.


{| border="1"
{{Admon/important | New Software Versions Require Reloading | If a piece of software is in use when you update it, the old version remains active until the application or service is restarted. Kernel updates take effect when you reboot the system.}}
|-
| {{Template:Important}} '''New Software Versions Require Reloading'''
|-
| If a piece of software is in use when you update it, the old version remains active until the application or service is restarted. Kernel updates take effect when you reboot the system.
|}


{| border="1"
{{Admon/note | Kernel Packages | Kernel packages remain on the system after they have been superseded by newer versions. This enables you to boot your system with an older kernel if an error occurs with the current kernel. To minimize maintenance, yum automatically removes obsolete kernel packages from your system, retaining only the current kernel and the previous version.}}
|-
| {{Template:Note}} '''Kernel Packages'''
|-
| Kernel packages remain on the system after they have been superseded by newer versions. This enables you to boot your system with an older kernel if an error occurs with the current kernel. To minimize maintenance, yum automatically removes obsolete kernel packages from your system, retaining only the current kernel and the previous version.
|}


To update all of the packages in the package group <code>MySQL Database</code>, enter the command:
To update all of the packages in the package group <code>MySQL Database</code>, enter the command:
Line 123: Line 93:
Enter the password for the ''root'' account when prompted.
Enter the password for the ''root'' account when prompted.


{| border="1"
{{Admon/note | Updating the Entire System | To update all of the packages on your Fedora system, use the commands described in [[Docs/Drafts/SoftwareManagementGuide/UpdateWithYum| Section 6, “Updating Your System with yum”]].}}
|-
| {{Template:Note}} '''Updating the Entire System'''
|-
| To update all of the packages on your Fedora system, use the commands described in [[Docs/Drafts/SoftwareManagementGuide/UpdateWithYum| Section 6, “Updating Your System with yum”]] .
|}


== 4.3. Removing Software with yum ==
== 4.3. Removing Software with yum ==
Line 146: Line 111:
Enter the password for the ''root'' account when prompted.
Enter the password for the ''root'' account when prompted.


{| border="1"
{{Admon/note | Data and Configuration File Retention | The removal process leaves user data in place but may remove configuration files in some cases. If a package removal does not include the configuration file, and you reinstall the package later, it may reuse the old configuration file.}}
 
{|
|-
|-
| {{Template:Note}} '''Data and Configuration File Retention'''
|[[Docs/Drafts/SoftwareManagementGuide/Tools| Previous Page - 3. Software Management Tools in Fedora Core]] ||[[Docs/Drafts/SoftwareManagementGuide| Table of Contents]] ||[[Docs/Drafts/SoftwareManagementGuide/SearchwithYum| Next Page - 5. Searching for Packages with yum]]
|-
| The removal process leaves user data in place but may remove configuration files in some cases. If a package removal does not include the configuration file, and you reinstall the package later, it may reuse the old configuration file.
|}
|}


{| border="1"
 
|-
[[Category:Software Management Guide]]
|[[Docs/Drafts/SoftwareManagementGuide/Tools| Previous Page - 3. Software Management Tools in Fedora Core]] ||[[Docs/Drafts/SoftwareManagementGuide| Table of Contents]] ||[[Docs/Drafts/SoftwareManagementGuide/SearchwithYum| Next Page - 5. Searching for Packages with yum]]

Latest revision as of 01:14, 4 March 2009

4. Managing Software with yum

Use the yum utility to modify the software on your system in four ways:

  • To install new software from package repositories
  • To install new software from an individual package file
  • To update existing software on your system
  • To remove unwanted software from your system
Installing Software from a Package File
The yum commands shown in this section use repositories as package sources. Refer to Section 8, “Installing Software from an Isolated Package” for details of using yum to install software from an individual package file.

To use yum, specify a function and one or more packages or package groups. Each section below gives some examples.

For each operation, yum downloads the latest package information from the configured repositories. If your system uses a slow network connection yum may require several seconds to download the repository indexes and the header files for each package.

The yum utility searches these data files to determine the best set of actions to produce the required result, and displays the transaction for you to approve. The transaction may include the installation, update, or removal of additional packages, in order to resolve software dependencies.

This is an example of the transaction for installing tsclient:

=============================================================================
Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
tsclient                i386       0.132-6          base              247 k
Installing for dependencies:
rdesktop                i386       1.4.0-2          base              107 k

Transaction Summary
=============================================================================
Install      2 Package(s)
Update       0 Package(s)
Remove       0 Package(s)
Total download size: 355 k
Is this ok [y/N] :

Example 1. Format of yum Transaction Reports

Review the list of changes, and then press [y] to accept and begin the process. If you press [N] or [Enter] , yum does not download or change any packages.

Package Versions
The yum utility only displays and uses the newest version of each package, unless you specify an older version.

The yum utility also imports the repository public key if it is not already installed on the rpm keyring.

This is an example of the public key import:

warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2
public key not available for tsclient-0.132-6.i386.rpm
Retrieving GPG key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
Importing GPG key 0x4F2A6FD2 "Fedora Project <fedora@redhat.com>"
Is this ok [y/N] :

Example 2. Format of yum Public Key Import

Check the public key, and then press [y] to import the key and authorize the key for use. If you press [N] or [Enter] , yum stops without installing any packages.

To ensure that downloaded packages are genuine, yum verifies the digital signature of each package against the public key of the provider. Once all of the packages required for the transaction are successfully downloaded and verified, yum applies them to your system.

Transaction Log
Every completed transaction records the affected packages in the log file /var/log/yum.log. You may only read this file with root access.

4.1. Installing New Software with yum

To install the package tsclient, enter the command:

su -c 'yum install tsclient'

Enter the password for the root account when prompted.

To install the package group MySQL Database, enter the command:

su -c 'yum groupinstall "MySQL Database"'

Enter the password for the root account when prompted.

New Services Require Activation
When you install a service, Fedora does not activate or start it. To configure a new service to run on bootup, choose System → Administration → Services from the top desktop panel, or use the chkconfig and service command-line utilities.

4.2. Updating Software with yum

To update the tsclient package to the latest version, type:

su -c 'yum update tsclient'

Enter the password for the root account when prompted.

New Software Versions Require Reloading
If a piece of software is in use when you update it, the old version remains active until the application or service is restarted. Kernel updates take effect when you reboot the system.
Kernel Packages
Kernel packages remain on the system after they have been superseded by newer versions. This enables you to boot your system with an older kernel if an error occurs with the current kernel. To minimize maintenance, yum automatically removes obsolete kernel packages from your system, retaining only the current kernel and the previous version.

To update all of the packages in the package group MySQL Database, enter the command:

su -c 'yum groupupdate "MySQL Database"'

Enter the password for the root account when prompted.

Updating the Entire System
To update all of the packages on your Fedora system, use the commands described in Section 6, “Updating Your System with yum”.

4.3. Removing Software with yum

To remove software, yum examines your system for both the specified software, and any software which claims it as a dependency. The transaction to remove the software deletes both the software and the dependencies.

To remove the tsclient package from your system, use the command:

su -c 'yum remove tsclient'

Enter the password for the root account when prompted.

To remove all of the packages in the package group MySQL Database, enter the command:

su -c 'yum groupremove "MySQL Database"'

Enter the password for the root account when prompted.

Data and Configuration File Retention
The removal process leaves user data in place but may remove configuration files in some cases. If a package removal does not include the configuration file, and you reinstall the package later, it may reuse the old configuration file.
Previous Page - 3. Software Management Tools in Fedora Core Table of Contents Next Page - 5. Searching for Packages with yum