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 9, “Manually Installing Software” for details of
using yum to install software from an
individual package file.
|
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
Review the list of changes, and then press y to
accept and begin the process. If you press N or
Enter, tsclient
:
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
tsclient i386 0.132-4 base 247 k
Installing for dependencies:
rdesktop i386 1.3.1-5 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 Reportsyum
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.
|
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:
Check the public key, and then press y to import
the key and authorize the key for use. If you press
N or Enter ,
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 443E1821
public key not available for tsclient-0.132-4.i386.rpm
Retrieving GPG key from http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-4
Importing GPG key 0x443E1821 "CentOS-4 Key<centos-4key@centos.org>"
Is this ok [y/N]:
Example 2. Format of
yum
Public Key Importyum
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.
Downloads are Cached | |
---|---|
The yum utility keeps downloaded data files
and packages for reuse. You may copy packages from the
repository cache directories under
/var/cache/yum/ , and use them elsewhere if
you wish. If you remove a package from the cache, you do not
affect the copy of the software installed on your system.
|
To install the package
To install the package group
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, CentOS does not activate or start
it. To configure a new service to run on bootup, choose
Desktop->System
Settings->Server Settings->Services, or use the
chkconfig and service
command-line utilities.
|
To update the
To update all of the packages in the package group
To remove software, 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. |
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 CentOS system, use the
commands described in
Section 6, “Updating Your System with yum ”.
|
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. |
No comments:
Post a Comment