SlideShare a Scribd company logo
yum
INSTALLING AND REMOVING PACKAGES USING YUM
A software package, or simply package, is the collection of scripts, programs, files, and
directories required to install and run an application, utility, server, or system software.
A package also includes a list of other packages the package depends on (dependencies). Using
software packages makes it easier to install, update, and uninstall software.
A package contains either executable files or source code files. Executable files are precompiled
for a specific processor architecture and operating system, whereas source files need to be
compiled but will run on a wide range of machines and operating systems.
A PMS, or package management system, is a set of utilities that allow you to install, upgrade,
remove, and search software packages easily and in a consistent manner. It is based on a local
database that holds information about each installed package, including its dependencies and
version information.
PackageKit (www.packagekit.org) is a front end for several PMSs, providing a uniform interface.
Fedora, Kubuntu, and SUSE use PackageKit. The gnome-packagekit package holds graphical tools
designed for the GNOME desktop; each of these tools is named gpk*.
/etc/yum.repos.d
The following example calls yum to install the tcsh shell, which is part of the tcsh package. After yum
determines what it needs to do, it asks for confirmation. Reply y if you want to continue or n to quit.
# yum install tcsh
Loaded plugins: langpacks, presto, refresh-packagekit
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package tcsh.i686 0:6.17-15.fc15 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
tcsh i686 6.17-15.fc15 updates-testing 403 k
Transaction Summary
================================================================================
Install 1 Package(s)
Total download size: 403 k
Installed size: 1.1 M
Is this ok [y/N]: y
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 403 k
tcsh-6.17-15.fc15.i686.rpm | 403 kB 00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : tcsh-6.17-15.fc15.i686 1/1
Installed:
tcsh.i686 0:6.17-15.fc15
Complete!
Automatically Installs dependencies
The next command installs the ypbind (NIS) package. Because this package depends
on other packages that are not installed (rpcbind and yp-tools), yum lists the package
under Installing for dependencies and installs them automatically. The yum utility
asks for confirmation before installing the packages.
# yum install ypbind
Loaded plugins: langpacks, presto, refresh-packagekit
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ypbind.i686 3:1.32-5.fc15 will be installed
--> Processing Dependency: yp-tools for package: 3:ypbind-1.32-5.fc15.i686
--> Processing Dependency: rpcbind for package: 3:ypbind-1.32-5.fc15.i686
--> Running transaction check
---> Package rpcbind.i686 0:0.2.0-10.fc15 will be installed
---> Package yp-tools.i686 0:2.12-4.fc15 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
ypbind i686 3:1.32-5.fc15 fedora 55 k
Installing for dependencies:
rpcbind i686 0.2.0-10.fc15 fedora 47 k
yp-tools i686 2.12-4.fc15 fedora 69 k
Transaction Summary
================================================================================
Install 3 Package(s)
Total download size: 171 k
Installed size: 345 k
Is this ok [y/N]: y
yum remove You can also use yum to remove packages, using a similar syntax. The following
example removes the tcsh package:
# yum remove tcsh
Loaded plugins: langpacks, presto, refresh-packagekit
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package tcsh.i686 0:6.17-15.fc15 will be erased
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================
==
Package Arch Version Repository Size
==============================================================================
==
Removing:
tcsh i686 6.17-15.fc15 @updates-testing 1.1 M
Transaction Summary
==============================================================================
==
Remove 1 Package(s)
Installed size: 1.1 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing : tcsh-6.17-15.fc15.i6861/1
Removed:
tcsh.i686 0:6.17-15.fc15
Complete!
Automatically
removes
dependencies
When yum removes a package, it also removes packages that are dependent on the
package it is removing. The followingexample removes ypbind and its dependency,
yp-tools.It does not remove rpcbindbecause another installed package might
depend on rpcbind.
# yum remove ypbind
Loaded plugins: langpacks, presto, refresh-packagekit
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package ypbind.i686 3:1.32-5.fc15 will be erased
--> Processing Dependency: ypbind for package: yp-tools-2.12-4.fc15.i686
--> Running transaction check
---> Package yp-tools.i686 0:2.12-4.fc15 will be erased
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Removing:
ypbind i686 3:1.32-5.fc15 @fedora 91 k
Removing for dependencies:
yp-tools i686 2.12-4.fc15 @fedora 167 k
Transaction Summary
================================================================================
Remove 2 Package(s)
Installed size: 258 k
Is this ok [y/N]: y
Finding the Package That Holds an
Application or File You Need
Finding a package with a name that sounds like...
The yum search command (next page) searches package names, descriptions, and summaries.
The yum list command (next page) searches package names only.
$ yum whatprovides "*X11/Xlib.h"
Loaded plugins: langpacks, presto, refresh-packagekit
...
libX11-devel-1.4.2-1.fc15.i686 : Development files for libX11
Repo : fedora
Matched from:
Filename : /usr/include/X11/Xlib.h
The most likely candidate is the entry shown in the preceding example, which is the
most generic. You can install this package using the following command:
# yum install libX11-devel
yum search The yum search command searches for a string in the package description,
summary,
and name fields. The following example searches for packages that have the string
vim in these fields:
$ yum search vim
Loaded plugins: langpacks, presto, refresh-packagekit
updates-testing/pkgtags | 44 kB 00:00
=============================== N/S Matched: vim ===============================
glusterfs-vim.i686 : Vim syntax file
perl-Text-VimColor.noarch : Syntax color text in HTML or XML using Vim
uzbl-vim.i686 : Vim highlighting for uzbl's config
vim-X11.i686 : The VIM version of the vi editor for the X Window System
vim-clustershell.noarch : VIM files for ClusterShell
vim-common.i686 : The common files needed by any version of the VIM editor
The yum list command searches for a package name field that matches a string.
Specify list available without an argument to list all packages that can be installed
from the yum repositories. The following example searches for packages whose
name fields match the string *emacs*:
$ yum list '*emacs*'
Loaded plugins: langpacks, presto, refresh-packagekit
Available Packages
clips-emacs.noarch 6.30.0-0.3.20090722svn.fc15 fedora
coq-emacs.i686 8.2pl1-1.fc12 fedora
crm114-emacs.i686 0-2.14.20100106.fc15 fedora
cvc3-emacs.noarch 2.2-3.fc15 fedora
cvc3-emacs-el.noarch 2.2-3.fc15 fedora
cvc3-xemacs.noarch 2.2-3.fc15 fedora
cvc3-xemacs-el.noarch 2.2-3.fc15 fedora
emacs.i686 1:23.2-17.fc15 fedora
yum: Keeps the System Up-to-Date
This section continues to describe yum. It covers updating installed packages, yum
commands and groups, downloading RPM package files, configuring yum, and
adding a repository specification. Refer to yum.baseurl.org for more information.
Updating Packages
The yum update command, without additional parameters, updates all installed packages.
# yum update
Loaded plugins: langpacks, presto, refresh-packagekit
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package gnome-games.i686 1:2.91.93-1.fc15 will be updated
---> Package gnome-games.i686 1:2.91.94-0.20110331.1.fc15 will be an update
---> Package xorg-x11-server-Xorg.i686 0:1.10.0-3.fc15 will be updated
---> Package xorg-x11-server-Xorg.i686 0:1.10.0-7.fc15 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Updating:
gnome-games i686 1:2.91.94-0.20110331.1.fc15 updates-testing 2.4 M
xorg-x11-server-Xorg i686 1.10.0-7.fc15 updates-testing 1.4 M
Transaction Summary
================================================================================
Upgrade 2 Package(s)
Total download size: 3.8 M
Is this ok [y/N]: y
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Download delta size: 1.2 M
(1/2): gnome-games-2.91.93-1.fc15_2.91.94-0.20110331.1.f| 341 kB 00:02
(2/2): xorg-x11-server-Xorg-1.10.0-3.fc15_1.10.0-7.fc15. | 870 kB 00:06
Finishing rebuild of rpms, from deltarpms
<delta rebuild> | 3.8 MB 00:02
Presto reduced the update size by 69% (from 3.8 M to 1.2 M).
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : 1:gnome-games-2.91.94-0.20110331.1.fc15.i6861/4
Updating : xorg-x11-server-Xorg-1.10.0-7.fc15.i686 2/4
Cleanup : 1:gnome-games-2.91.93-1.fc15.i6863/4
Cleanup : xorg-x11-server-Xorg-1.10.0-3.fc15.i6864/4
Updated:
gnome-games.i6861:2.91.94-0.20110331.1.fc15
xorg-x11-server-Xorg.i6860:1.10.0-7.fc15
Complete!
yum Commands
This section describes a few commonly used yum commands. The yum man page contains a complete
list.
check Reports on problems in the local RPM database.
check-update Lists packages that are installed on the local system and have updates available in the
yum repositories.
clean all Removes header files that yum uses for resolving dependencies. Also removes cached
packages. However, because yum removes packages after they have been installed, typically no
cached packages exist
clean metadata Removes the files yum uses to determine remote package availability. Using this
command forces yum to download all metadata the next time you run it.
grouplist Lists yum groups (next).
groupinfo group Lists information about the yum group named group (next).
groupinstall group Installs the packages in the yum group named group (next).
info word Displays information about packages in the yum repositories named word. Specify
word as "*word*" to search for word anywhere in the package name.
list word Lists packages in the yum repositories whose name is word. Specify word as
"*word*" to search for word anywhere in the package name. See page 538 for an
example.
list available Lists all packages that can be installed from the yum repositories. Use a pipe and
grep to search for packages (e.g., yum list available | grep samba).
provides Same as whatprovides.
search word Lists packages in the yum repositories that have word in their descriptions, summaries,
or names. See page 538 for an example.
whatprovides word
Searches repositories and displays a list of packages that provides a feature or file
that matches word. Specify word as "*word*"
yum Groups
In addition to working with single packages, yum can work with groups of packages.
The next example shows how to display a list of installed and available groups:
$ yum grouplist
Loaded plugins: langpacks, presto, refresh-packagekit
Setting up Group Process
Installed Groups:
Administration Tools
Dial-up Networking Support Fonts
GNOME Desktop Environment
...
Window Managers
X Window System
Installed Language Groups:
Arabic Support [ar]
Armenian Support [hy]
AvailableGroups:
...
MySQL Database
...
Done
The command yum groupinfo followed by the name of a group displays information
about the group, includinga description of the group and a list of mandatory,
default, and optional packages. The next example displays information
about the MySQL Database group of packages. You must quote group names
that include SPACEs.
# yum groupinfo "MySQL Database"
Loaded plugins: langpacks, presto, refresh-packagekit
Setting up Group Process
Group: MySQL Database
Description: This package group contains packages useful for use with MySQL.
Mandatory Packages:
mysql
Default Packages:
MySQL-python
libdbi-dbd-mysql
mysql-connector-odbc
mysql-server
perl-DBD-MySQL
unixODBC
Optional Packages:
mod_auth_mysql
mysql-bench
mysql-devel
mysqlreport
mysqltuner
php-mysql
qt-mysql
qt3-MySQL
Downloading RPM Package Files with
yumdownloader
The yumdownloader utility (yum-utils package) locates and downloads—but does
not install—RPM files. Because it does not install software, you do not need to
work with root privileges to run it; you need only permission to write to the
working directory
The following example downloads the samba RPM file to the working directory:
$ yumdownloader samba
Loaded plugins: langpacks, presto, refresh-packagekit
samba-3.6.0-64pre1.fc15.1.i686.rpm | 4.5 MB 00:04
Downloading
source files
You can use yumdownloader with the ––source option to download RPM source
package files. The yumdownloader utility automatically enables the necessary source
repositories. See page 586 for an example that downloads in the working directory
the RPM file for the latest version of the kernel source code for the release installed
on the local system. Without the ––source option, yumdownloader would have
downloaded an executable RPM file. See page 551 for information on installing this
type of file.
yum.conf: Configures yum
You do not need to configure yum: As installed, it is ready to use. This section
describes the yum configuration files for users who want to modify them. The primary
configuration file, /etc/yum.conf, holds global settings. As distributed with
Fedora/RHEL, files in the /etc/yum.repos.d directory define repositories. Following
is the default yum.conf file:
$ cat /etc/yum.conf
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3
color=never
...
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
The section labeled [main] defines global configuration options. The cachedir specifies
the directory where yum stores downloaded packages, although with keepcache
set to 0, yum does not store these packages after installing them. The amount of
information logged is specified by debuglevel, with a value of 10 producing the
most information. The logfile specifies where yum keeps its log.
Setting exactarch to 1 causes yum to update packages only with packages of the
same architecture, thereby preventing an i686 package from replacing an i386
package, for example. You can use retries to specify the number of times yum will
try to retrieve a file before returning an error (the default is 6). Set this parameter to
0 to cause yum to continue trying forever.
yum Repositories
As noted in /etc/yum.conf, Fedora/RHEL stores information about each repository
in a separate file in the /etc/yum.repos.d directory:
$ ls /etc/yum.repos.d
fedora.repo fedora-updates.repo fedora-updates-testing.repo
The next example shows part of the fedora.repo file that specifies the parameters
for the fedora repository:
$ cat /etc/yum.repos.d/fedora.repo
[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
enabled=1
#metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

More Related Content

What's hot

Linux Basic Commands
Linux Basic CommandsLinux Basic Commands
Linux Basic Commands
Hanan Nmr
 
User Administration in Linux
User Administration in LinuxUser Administration in Linux
User Administration in Linux
SAMUEL OJO
 
Bash shell
Bash shellBash shell
Bash shellxylas121
 
Complete Guide for Linux shell programming
Complete Guide for Linux shell programmingComplete Guide for Linux shell programming
Complete Guide for Linux shell programming
sudhir singh yadav
 
Linux LVM Logical Volume Management
Linux LVM Logical Volume ManagementLinux LVM Logical Volume Management
Linux LVM Logical Volume Management
Manolis Kartsonakis
 
Software management in linux
Software management in linuxSoftware management in linux
Software management in linuxnejadmand
 
package mangement
package mangementpackage mangement
package mangement
ARYA TM
 
101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package managementAcácio Oliveira
 
Bash shell scripting
Bash shell scriptingBash shell scripting
Bash shell scripting
VIKAS TIWARI
 
Linux Commands
Linux CommandsLinux Commands
Linux Commands
Ramasubbu .P
 
Security Concepts - Linux
Security Concepts - LinuxSecurity Concepts - Linux
Security Concepts - Linux
Henry Osborne
 
Linux: LVM
Linux: LVMLinux: LVM
Linux: LVM
Michal Sedlak
 
Linux Run Level
Linux Run LevelLinux Run Level
Linux Run Level
Gaurav Mishra
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
Manav Prasad
 
Linux basics part 1
Linux basics part 1Linux basics part 1
Linux basics part 1
Lilesh Pathe
 
Storage Management in Linux OS.ppt
Storage Management in Linux OS.pptStorage Management in Linux OS.ppt
Storage Management in Linux OS.ppt
Rakesh Kadu
 
Linux commands and file structure
Linux commands and file structureLinux commands and file structure
Linux commands and file structure
Sreenatha Reddy K R
 

What's hot (20)

Linux Basic Commands
Linux Basic CommandsLinux Basic Commands
Linux Basic Commands
 
User Administration in Linux
User Administration in LinuxUser Administration in Linux
User Administration in Linux
 
Bash shell
Bash shellBash shell
Bash shell
 
Complete Guide for Linux shell programming
Complete Guide for Linux shell programmingComplete Guide for Linux shell programming
Complete Guide for Linux shell programming
 
Linux LVM Logical Volume Management
Linux LVM Logical Volume ManagementLinux LVM Logical Volume Management
Linux LVM Logical Volume Management
 
Software management in linux
Software management in linuxSoftware management in linux
Software management in linux
 
package mangement
package mangementpackage mangement
package mangement
 
101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management
 
Bash shell scripting
Bash shell scriptingBash shell scripting
Bash shell scripting
 
Linux Commands
Linux CommandsLinux Commands
Linux Commands
 
Security Concepts - Linux
Security Concepts - LinuxSecurity Concepts - Linux
Security Concepts - Linux
 
Linux: LVM
Linux: LVMLinux: LVM
Linux: LVM
 
Linux Run Level
Linux Run LevelLinux Run Level
Linux Run Level
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
 
Shell Scripting
Shell ScriptingShell Scripting
Shell Scripting
 
Linux file system
Linux file systemLinux file system
Linux file system
 
Linux basics part 1
Linux basics part 1Linux basics part 1
Linux basics part 1
 
Basic 50 linus command
Basic 50 linus commandBasic 50 linus command
Basic 50 linus command
 
Storage Management in Linux OS.ppt
Storage Management in Linux OS.pptStorage Management in Linux OS.ppt
Storage Management in Linux OS.ppt
 
Linux commands and file structure
Linux commands and file structureLinux commands and file structure
Linux commands and file structure
 

Viewers also liked

06 module catalyst 1900 switch operations
06  module  catalyst 1900 switch operations06  module  catalyst 1900 switch operations
06 module catalyst 1900 switch operationsAsif
 
Password Recovery
Password RecoveryPassword Recovery
Password Recovery
NetProtocol Xpert
 
Cisco 2960x switch password recovery
Cisco 2960x switch password recoveryCisco 2960x switch password recovery
Cisco 2960x switch password recovery
NetProtocol Xpert
 
Cehv8 - Module 16: Hacking Mobile Platforms
Cehv8 - Module 16: Hacking Mobile PlatformsCehv8 - Module 16: Hacking Mobile Platforms
Cehv8 - Module 16: Hacking Mobile Platforms
Vuz Dở Hơi
 
VMware ESXi 6.0 Installation Process
VMware ESXi 6.0 Installation ProcessVMware ESXi 6.0 Installation Process
VMware ESXi 6.0 Installation Process
NetProtocol Xpert
 
Thermal engg
Thermal enggThermal engg
Thermal engg
sumit wagh
 
How to recover password on a cisco 2950, 2960 switch
How to recover password on a cisco 2950, 2960 switchHow to recover password on a cisco 2950, 2960 switch
How to recover password on a cisco 2950, 2960 switch
IT Tech
 

Viewers also liked (8)

06 module catalyst 1900 switch operations
06  module  catalyst 1900 switch operations06  module  catalyst 1900 switch operations
06 module catalyst 1900 switch operations
 
12 yum
12  yum12  yum
12 yum
 
Password Recovery
Password RecoveryPassword Recovery
Password Recovery
 
Cisco 2960x switch password recovery
Cisco 2960x switch password recoveryCisco 2960x switch password recovery
Cisco 2960x switch password recovery
 
Cehv8 - Module 16: Hacking Mobile Platforms
Cehv8 - Module 16: Hacking Mobile PlatformsCehv8 - Module 16: Hacking Mobile Platforms
Cehv8 - Module 16: Hacking Mobile Platforms
 
VMware ESXi 6.0 Installation Process
VMware ESXi 6.0 Installation ProcessVMware ESXi 6.0 Installation Process
VMware ESXi 6.0 Installation Process
 
Thermal engg
Thermal enggThermal engg
Thermal engg
 
How to recover password on a cisco 2950, 2960 switch
How to recover password on a cisco 2950, 2960 switchHow to recover password on a cisco 2950, 2960 switch
How to recover password on a cisco 2950, 2960 switch
 

Similar to Yum (Linux)

Oracle11g On Fedora14
Oracle11g On Fedora14Oracle11g On Fedora14
Oracle11g On Fedora14
kmsa
 
Oracle11g on fedora14
Oracle11g on fedora14Oracle11g on fedora14
Oracle11g on fedora14
Khalid Matar Albuflasah
 
How to Use EXAchk Effectively to Manage Exadata Environments
How to Use EXAchk Effectively to Manage Exadata EnvironmentsHow to Use EXAchk Effectively to Manage Exadata Environments
How to Use EXAchk Effectively to Manage Exadata Environments
Sandesh Rao
 
Linux Troubleshooting
Linux TroubleshootingLinux Troubleshooting
Linux Troubleshooting
Keith Wright
 
Powervc upgrade from_1.3.0.2_to_1.3.2.0
Powervc upgrade from_1.3.0.2_to_1.3.2.0Powervc upgrade from_1.3.0.2_to_1.3.2.0
Powervc upgrade from_1.3.0.2_to_1.3.2.0
Gobinath Panchavarnam
 
AIX Advanced Administration Knowledge Share
AIX Advanced Administration Knowledge ShareAIX Advanced Administration Knowledge Share
AIX Advanced Administration Knowledge Share
.Gastón. .Bx.
 
Prizm Installation Guide
Prizm Installation GuidePrizm Installation Guide
Prizm Installation Guide
vjvarenya
 
Mancoosi
MancoosiMancoosi
$ make install
$ make install$ make install
$ make install
Marios Isaakidis
 
OSGi provisioning deep dive and demo (Subsystems, Repository, Contracts and m...
OSGi provisioning deep dive and demo (Subsystems, Repository, Contracts and m...OSGi provisioning deep dive and demo (Subsystems, Repository, Contracts and m...
OSGi provisioning deep dive and demo (Subsystems, Repository, Contracts and m...
mfrancis
 
Releasing and deploying python tools
Releasing and deploying python toolsReleasing and deploying python tools
Releasing and deploying python tools
Quintagroup
 
Ovms ops manager_admin
Ovms ops manager_adminOvms ops manager_admin
Ovms ops manager_adminsati1981
 
MySQL Monitoring using Prometheus & Grafana
MySQL Monitoring using Prometheus & GrafanaMySQL Monitoring using Prometheus & Grafana
MySQL Monitoring using Prometheus & Grafana
YoungHeon (Roy) Kim
 
Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5Carlos Eduardo
 
Install websphere message broker 8 RHEL 6 64 bits
Install websphere message broker 8 RHEL 6 64 bitsInstall websphere message broker 8 RHEL 6 64 bits
Install websphere message broker 8 RHEL 6 64 bits
Manuel Vega
 
Yum package manager
Yum package managerYum package manager
Yum package manager
LinuxConcept
 
101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management
Acácio Oliveira
 

Similar to Yum (Linux) (20)

Oracle11g On Fedora14
Oracle11g On Fedora14Oracle11g On Fedora14
Oracle11g On Fedora14
 
Oracle11g on fedora14
Oracle11g on fedora14Oracle11g on fedora14
Oracle11g on fedora14
 
How to Use EXAchk Effectively to Manage Exadata Environments
How to Use EXAchk Effectively to Manage Exadata EnvironmentsHow to Use EXAchk Effectively to Manage Exadata Environments
How to Use EXAchk Effectively to Manage Exadata Environments
 
Linux Troubleshooting
Linux TroubleshootingLinux Troubleshooting
Linux Troubleshooting
 
Powervc upgrade from_1.3.0.2_to_1.3.2.0
Powervc upgrade from_1.3.0.2_to_1.3.2.0Powervc upgrade from_1.3.0.2_to_1.3.2.0
Powervc upgrade from_1.3.0.2_to_1.3.2.0
 
AIX Advanced Administration Knowledge Share
AIX Advanced Administration Knowledge ShareAIX Advanced Administration Knowledge Share
AIX Advanced Administration Knowledge Share
 
Prizm Installation Guide
Prizm Installation GuidePrizm Installation Guide
Prizm Installation Guide
 
Mancoosi
MancoosiMancoosi
Mancoosi
 
$ make install
$ make install$ make install
$ make install
 
OSGi provisioning deep dive and demo (Subsystems, Repository, Contracts and m...
OSGi provisioning deep dive and demo (Subsystems, Repository, Contracts and m...OSGi provisioning deep dive and demo (Subsystems, Repository, Contracts and m...
OSGi provisioning deep dive and demo (Subsystems, Repository, Contracts and m...
 
Wissbi osdc pdf
Wissbi osdc pdfWissbi osdc pdf
Wissbi osdc pdf
 
OTRS
OTRSOTRS
OTRS
 
Releasing and deploying python tools
Releasing and deploying python toolsReleasing and deploying python tools
Releasing and deploying python tools
 
Ovms ops manager_admin
Ovms ops manager_adminOvms ops manager_admin
Ovms ops manager_admin
 
MySQL Monitoring using Prometheus & Grafana
MySQL Monitoring using Prometheus & GrafanaMySQL Monitoring using Prometheus & Grafana
MySQL Monitoring using Prometheus & Grafana
 
Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5
 
Install websphere message broker 8 RHEL 6 64 bits
Install websphere message broker 8 RHEL 6 64 bitsInstall websphere message broker 8 RHEL 6 64 bits
Install websphere message broker 8 RHEL 6 64 bits
 
NIH package manager for pkgsrc
NIH package manager for pkgsrcNIH package manager for pkgsrc
NIH package manager for pkgsrc
 
Yum package manager
Yum package managerYum package manager
Yum package manager
 
101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management
 

More from Raghu nath

Mongo db
Mongo dbMongo db
Mongo db
Raghu nath
 
Ftp (file transfer protocol)
Ftp (file transfer protocol)Ftp (file transfer protocol)
Ftp (file transfer protocol)
Raghu nath
 
Javascript part1
Javascript part1Javascript part1
Javascript part1Raghu nath
 
Regular expressions
Regular expressionsRegular expressions
Regular expressionsRaghu nath
 
Selection sort
Selection sortSelection sort
Selection sortRaghu nath
 
Binary search
Binary search Binary search
Binary search Raghu nath
 
JSON(JavaScript Object Notation)
JSON(JavaScript Object Notation)JSON(JavaScript Object Notation)
JSON(JavaScript Object Notation)Raghu nath
 
Stemming algorithms
Stemming algorithmsStemming algorithms
Stemming algorithmsRaghu nath
 
Step by step guide to install dhcp role
Step by step guide to install dhcp roleStep by step guide to install dhcp role
Step by step guide to install dhcp roleRaghu nath
 
Network essentials chapter 4
Network essentials  chapter 4Network essentials  chapter 4
Network essentials chapter 4Raghu nath
 
Network essentials chapter 3
Network essentials  chapter 3Network essentials  chapter 3
Network essentials chapter 3Raghu nath
 
Network essentials chapter 2
Network essentials  chapter 2Network essentials  chapter 2
Network essentials chapter 2Raghu nath
 
Network essentials - chapter 1
Network essentials - chapter 1Network essentials - chapter 1
Network essentials - chapter 1Raghu nath
 
Python chapter 2
Python chapter 2Python chapter 2
Python chapter 2Raghu nath
 
python chapter 1
python chapter 1python chapter 1
python chapter 1Raghu nath
 
Linux Shell Scripting
Linux Shell ScriptingLinux Shell Scripting
Linux Shell ScriptingRaghu nath
 

More from Raghu nath (20)

Mongo db
Mongo dbMongo db
Mongo db
 
Ftp (file transfer protocol)
Ftp (file transfer protocol)Ftp (file transfer protocol)
Ftp (file transfer protocol)
 
MS WORD 2013
MS WORD 2013MS WORD 2013
MS WORD 2013
 
Msword
MswordMsword
Msword
 
Ms word
Ms wordMs word
Ms word
 
Javascript part1
Javascript part1Javascript part1
Javascript part1
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
 
Selection sort
Selection sortSelection sort
Selection sort
 
Binary search
Binary search Binary search
Binary search
 
JSON(JavaScript Object Notation)
JSON(JavaScript Object Notation)JSON(JavaScript Object Notation)
JSON(JavaScript Object Notation)
 
Stemming algorithms
Stemming algorithmsStemming algorithms
Stemming algorithms
 
Step by step guide to install dhcp role
Step by step guide to install dhcp roleStep by step guide to install dhcp role
Step by step guide to install dhcp role
 
Network essentials chapter 4
Network essentials  chapter 4Network essentials  chapter 4
Network essentials chapter 4
 
Network essentials chapter 3
Network essentials  chapter 3Network essentials  chapter 3
Network essentials chapter 3
 
Network essentials chapter 2
Network essentials  chapter 2Network essentials  chapter 2
Network essentials chapter 2
 
Network essentials - chapter 1
Network essentials - chapter 1Network essentials - chapter 1
Network essentials - chapter 1
 
Python chapter 2
Python chapter 2Python chapter 2
Python chapter 2
 
python chapter 1
python chapter 1python chapter 1
python chapter 1
 
Linux Shell Scripting
Linux Shell ScriptingLinux Shell Scripting
Linux Shell Scripting
 
Perl
PerlPerl
Perl
 

Recently uploaded

Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
Steve Thomason
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
Vivekanand Anglo Vedic Academy
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 

Recently uploaded (20)

Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 

Yum (Linux)

  • 1. yum INSTALLING AND REMOVING PACKAGES USING YUM
  • 2. A software package, or simply package, is the collection of scripts, programs, files, and directories required to install and run an application, utility, server, or system software. A package also includes a list of other packages the package depends on (dependencies). Using software packages makes it easier to install, update, and uninstall software. A package contains either executable files or source code files. Executable files are precompiled for a specific processor architecture and operating system, whereas source files need to be compiled but will run on a wide range of machines and operating systems.
  • 3. A PMS, or package management system, is a set of utilities that allow you to install, upgrade, remove, and search software packages easily and in a consistent manner. It is based on a local database that holds information about each installed package, including its dependencies and version information.
  • 4. PackageKit (www.packagekit.org) is a front end for several PMSs, providing a uniform interface. Fedora, Kubuntu, and SUSE use PackageKit. The gnome-packagekit package holds graphical tools designed for the GNOME desktop; each of these tools is named gpk*. /etc/yum.repos.d
  • 5. The following example calls yum to install the tcsh shell, which is part of the tcsh package. After yum determines what it needs to do, it asks for confirmation. Reply y if you want to continue or n to quit. # yum install tcsh Loaded plugins: langpacks, presto, refresh-packagekit Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package tcsh.i686 0:6.17-15.fc15 will be installed --> Finished Dependency Resolution Dependencies Resolved
  • 6. ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: tcsh i686 6.17-15.fc15 updates-testing 403 k Transaction Summary ================================================================================ Install 1 Package(s) Total download size: 403 k Installed size: 1.1 M
  • 7. Is this ok [y/N]: y Downloading Packages: Setting up and reading Presto delta metadata Processing delta metadata Package(s) data still to download: 403 k tcsh-6.17-15.fc15.i686.rpm | 403 kB 00:01 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : tcsh-6.17-15.fc15.i686 1/1 Installed: tcsh.i686 0:6.17-15.fc15 Complete!
  • 8. Automatically Installs dependencies The next command installs the ypbind (NIS) package. Because this package depends on other packages that are not installed (rpcbind and yp-tools), yum lists the package under Installing for dependencies and installs them automatically. The yum utility asks for confirmation before installing the packages.
  • 9. # yum install ypbind Loaded plugins: langpacks, presto, refresh-packagekit Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package ypbind.i686 3:1.32-5.fc15 will be installed --> Processing Dependency: yp-tools for package: 3:ypbind-1.32-5.fc15.i686 --> Processing Dependency: rpcbind for package: 3:ypbind-1.32-5.fc15.i686 --> Running transaction check ---> Package rpcbind.i686 0:0.2.0-10.fc15 will be installed ---> Package yp-tools.i686 0:2.12-4.fc15 will be installed --> Finished Dependency Resolution Dependencies Resolved
  • 10. ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: ypbind i686 3:1.32-5.fc15 fedora 55 k Installing for dependencies: rpcbind i686 0.2.0-10.fc15 fedora 47 k yp-tools i686 2.12-4.fc15 fedora 69 k Transaction Summary ================================================================================ Install 3 Package(s) Total download size: 171 k Installed size: 345 k Is this ok [y/N]: y
  • 11. yum remove You can also use yum to remove packages, using a similar syntax. The following example removes the tcsh package: # yum remove tcsh Loaded plugins: langpacks, presto, refresh-packagekit Setting up Remove Process Resolving Dependencies --> Running transaction check ---> Package tcsh.i686 0:6.17-15.fc15 will be erased --> Finished Dependency Resolution Dependencies Resolved
  • 12. ============================================================================== == Package Arch Version Repository Size ============================================================================== == Removing: tcsh i686 6.17-15.fc15 @updates-testing 1.1 M Transaction Summary ============================================================================== == Remove 1 Package(s)
  • 13. Installed size: 1.1 M Is this ok [y/N]: y Downloading Packages: Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Erasing : tcsh-6.17-15.fc15.i6861/1 Removed: tcsh.i686 0:6.17-15.fc15 Complete! Automatically removes dependencies When yum removes a package, it also removes packages that are dependent on the package it is removing. The followingexample removes ypbind and its dependency, yp-tools.It does not remove rpcbindbecause another installed package might depend on rpcbind.
  • 14. # yum remove ypbind Loaded plugins: langpacks, presto, refresh-packagekit Setting up Remove Process Resolving Dependencies --> Running transaction check ---> Package ypbind.i686 3:1.32-5.fc15 will be erased --> Processing Dependency: ypbind for package: yp-tools-2.12-4.fc15.i686 --> Running transaction check ---> Package yp-tools.i686 0:2.12-4.fc15 will be erased --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size
  • 15. ================================================================================ Removing: ypbind i686 3:1.32-5.fc15 @fedora 91 k Removing for dependencies: yp-tools i686 2.12-4.fc15 @fedora 167 k Transaction Summary ================================================================================ Remove 2 Package(s) Installed size: 258 k Is this ok [y/N]: y
  • 16. Finding the Package That Holds an Application or File You Need Finding a package with a name that sounds like... The yum search command (next page) searches package names, descriptions, and summaries. The yum list command (next page) searches package names only. $ yum whatprovides "*X11/Xlib.h" Loaded plugins: langpacks, presto, refresh-packagekit ... libX11-devel-1.4.2-1.fc15.i686 : Development files for libX11 Repo : fedora Matched from: Filename : /usr/include/X11/Xlib.h
  • 17. The most likely candidate is the entry shown in the preceding example, which is the most generic. You can install this package using the following command: # yum install libX11-devel yum search The yum search command searches for a string in the package description, summary, and name fields. The following example searches for packages that have the string vim in these fields:
  • 18. $ yum search vim Loaded plugins: langpacks, presto, refresh-packagekit updates-testing/pkgtags | 44 kB 00:00 =============================== N/S Matched: vim =============================== glusterfs-vim.i686 : Vim syntax file perl-Text-VimColor.noarch : Syntax color text in HTML or XML using Vim uzbl-vim.i686 : Vim highlighting for uzbl's config vim-X11.i686 : The VIM version of the vi editor for the X Window System vim-clustershell.noarch : VIM files for ClusterShell vim-common.i686 : The common files needed by any version of the VIM editor
  • 19. The yum list command searches for a package name field that matches a string. Specify list available without an argument to list all packages that can be installed from the yum repositories. The following example searches for packages whose name fields match the string *emacs*:
  • 20. $ yum list '*emacs*' Loaded plugins: langpacks, presto, refresh-packagekit Available Packages clips-emacs.noarch 6.30.0-0.3.20090722svn.fc15 fedora coq-emacs.i686 8.2pl1-1.fc12 fedora crm114-emacs.i686 0-2.14.20100106.fc15 fedora cvc3-emacs.noarch 2.2-3.fc15 fedora cvc3-emacs-el.noarch 2.2-3.fc15 fedora cvc3-xemacs.noarch 2.2-3.fc15 fedora cvc3-xemacs-el.noarch 2.2-3.fc15 fedora emacs.i686 1:23.2-17.fc15 fedora
  • 21. yum: Keeps the System Up-to-Date This section continues to describe yum. It covers updating installed packages, yum commands and groups, downloading RPM package files, configuring yum, and adding a repository specification. Refer to yum.baseurl.org for more information.
  • 22. Updating Packages The yum update command, without additional parameters, updates all installed packages. # yum update Loaded plugins: langpacks, presto, refresh-packagekit Setting up Update Process Resolving Dependencies --> Running transaction check ---> Package gnome-games.i686 1:2.91.93-1.fc15 will be updated ---> Package gnome-games.i686 1:2.91.94-0.20110331.1.fc15 will be an update ---> Package xorg-x11-server-Xorg.i686 0:1.10.0-3.fc15 will be updated ---> Package xorg-x11-server-Xorg.i686 0:1.10.0-7.fc15 will be an update --> Finished Dependency Resolution Dependencies Resolved
  • 23. ================================================================================ Package Arch Version Repository Size ================================================================================ Updating: gnome-games i686 1:2.91.94-0.20110331.1.fc15 updates-testing 2.4 M xorg-x11-server-Xorg i686 1.10.0-7.fc15 updates-testing 1.4 M Transaction Summary ================================================================================ Upgrade 2 Package(s) Total download size: 3.8 M Is this ok [y/N]: y Downloading Packages:
  • 24. Setting up and reading Presto delta metadata Processing delta metadata Download delta size: 1.2 M (1/2): gnome-games-2.91.93-1.fc15_2.91.94-0.20110331.1.f| 341 kB 00:02 (2/2): xorg-x11-server-Xorg-1.10.0-3.fc15_1.10.0-7.fc15. | 870 kB 00:06 Finishing rebuild of rpms, from deltarpms <delta rebuild> | 3.8 MB 00:02 Presto reduced the update size by 69% (from 3.8 M to 1.2 M). Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Updating : 1:gnome-games-2.91.94-0.20110331.1.fc15.i6861/4 Updating : xorg-x11-server-Xorg-1.10.0-7.fc15.i686 2/4 Cleanup : 1:gnome-games-2.91.93-1.fc15.i6863/4 Cleanup : xorg-x11-server-Xorg-1.10.0-3.fc15.i6864/4 Updated: gnome-games.i6861:2.91.94-0.20110331.1.fc15 xorg-x11-server-Xorg.i6860:1.10.0-7.fc15 Complete!
  • 25.
  • 26. yum Commands This section describes a few commonly used yum commands. The yum man page contains a complete list. check Reports on problems in the local RPM database. check-update Lists packages that are installed on the local system and have updates available in the yum repositories. clean all Removes header files that yum uses for resolving dependencies. Also removes cached packages. However, because yum removes packages after they have been installed, typically no cached packages exist clean metadata Removes the files yum uses to determine remote package availability. Using this command forces yum to download all metadata the next time you run it. grouplist Lists yum groups (next). groupinfo group Lists information about the yum group named group (next). groupinstall group Installs the packages in the yum group named group (next).
  • 27. info word Displays information about packages in the yum repositories named word. Specify word as "*word*" to search for word anywhere in the package name. list word Lists packages in the yum repositories whose name is word. Specify word as "*word*" to search for word anywhere in the package name. See page 538 for an example. list available Lists all packages that can be installed from the yum repositories. Use a pipe and grep to search for packages (e.g., yum list available | grep samba). provides Same as whatprovides. search word Lists packages in the yum repositories that have word in their descriptions, summaries, or names. See page 538 for an example. whatprovides word Searches repositories and displays a list of packages that provides a feature or file that matches word. Specify word as "*word*"
  • 28. yum Groups In addition to working with single packages, yum can work with groups of packages. The next example shows how to display a list of installed and available groups: $ yum grouplist Loaded plugins: langpacks, presto, refresh-packagekit Setting up Group Process Installed Groups: Administration Tools Dial-up Networking Support Fonts
  • 29. GNOME Desktop Environment ... Window Managers X Window System Installed Language Groups: Arabic Support [ar] Armenian Support [hy] AvailableGroups: ... MySQL Database ... Done The command yum groupinfo followed by the name of a group displays information about the group, includinga description of the group and a list of mandatory, default, and optional packages. The next example displays information about the MySQL Database group of packages. You must quote group names that include SPACEs.
  • 30. # yum groupinfo "MySQL Database" Loaded plugins: langpacks, presto, refresh-packagekit Setting up Group Process Group: MySQL Database Description: This package group contains packages useful for use with MySQL. Mandatory Packages: mysql Default Packages: MySQL-python libdbi-dbd-mysql mysql-connector-odbc mysql-server perl-DBD-MySQL unixODBC
  • 32. Downloading RPM Package Files with yumdownloader The yumdownloader utility (yum-utils package) locates and downloads—but does not install—RPM files. Because it does not install software, you do not need to work with root privileges to run it; you need only permission to write to the working directory
  • 33. The following example downloads the samba RPM file to the working directory: $ yumdownloader samba Loaded plugins: langpacks, presto, refresh-packagekit samba-3.6.0-64pre1.fc15.1.i686.rpm | 4.5 MB 00:04 Downloading source files You can use yumdownloader with the ––source option to download RPM source package files. The yumdownloader utility automatically enables the necessary source repositories. See page 586 for an example that downloads in the working directory the RPM file for the latest version of the kernel source code for the release installed on the local system. Without the ––source option, yumdownloader would have downloaded an executable RPM file. See page 551 for information on installing this type of file.
  • 34. yum.conf: Configures yum You do not need to configure yum: As installed, it is ready to use. This section describes the yum configuration files for users who want to modify them. The primary configuration file, /etc/yum.conf, holds global settings. As distributed with Fedora/RHEL, files in the /etc/yum.repos.d directory define repositories. Following is the default yum.conf file:
  • 36. The section labeled [main] defines global configuration options. The cachedir specifies the directory where yum stores downloaded packages, although with keepcache set to 0, yum does not store these packages after installing them. The amount of information logged is specified by debuglevel, with a value of 10 producing the most information. The logfile specifies where yum keeps its log. Setting exactarch to 1 causes yum to update packages only with packages of the same architecture, thereby preventing an i686 package from replacing an i386 package, for example. You can use retries to specify the number of times yum will try to retrieve a file before returning an error (the default is 6). Set this parameter to 0 to cause yum to continue trying forever.
  • 37. yum Repositories As noted in /etc/yum.conf, Fedora/RHEL stores information about each repository in a separate file in the /etc/yum.repos.d directory: $ ls /etc/yum.repos.d fedora.repo fedora-updates.repo fedora-updates-testing.repo
  • 38. The next example shows part of the fedora.repo file that specifies the parameters for the fedora repository: $ cat /etc/yum.repos.d/fedora.repo [fedora] name=Fedora $releasever - $basearch failovermethod=priority #baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/ mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch enabled=1 #metadata_expire=7d gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch