SlideShare uma empresa Scribd logo
1 de 5
Baixar para ler offline
YUM (Yellowdog Updater Modified)
Yellowdog Update, Modified (YUM)is a package manager that was developed by Duke University
to improve the installation of RPMs. yumsearches numerous repositories for packages and their
dependencies so they may be installed together in an effort to alleviate dependency issues. Red Hat
Enterprise Linux 5.2 uses yumto fetch packages and install RPMs.
up2date is now deprecated in favor of yum(Yellowdog Updater Modified). The entire stack of tools
which installs and updates software in Red Hat Enterprise Linux 5.2 is now based on yum. This
includes everything, from the initial installation via Anaconda to host software management tools like
pirut.
yumalso allows system administrators to configure a local (i.e. available over a local network)
repository to supplement packages provided by Red Hat. This is useful for user groups that use
applications and packages that are not officiallysupported by Red Hat.
Aside from being able to supplement available packages for local users, using a local yum repository
also saves bandwidth for the entire network. Further, clients that use local yumrepositories do not
need to be registered individually to install or update the latest packages from Red Hat Network.
12.1. Setting Up a Yum Repository
To set up a repository for Red Hat Enterprise Linux packages, follow these steps:
1. Install the createrepo package:
~]# yum install createrepo
2. Copy all the packages you want to provide in the repository into one directory (/mnt/
local_repo for example).
3. Run createrepo on that directory (for example, createrepo /mnt/local_repo). This will
create the necessary metadata for your Yum repository.
12.2. yum Commands
yumcommands are typically run as yum <command> <package name/s> . By default, yum will
automatically attempt to check all configured repositories to resolve all package dependencies during
an installation/upgrade.
The following is a list of the most commonly-used yum commands. For a complete list of available yum
commands, refer to man yum.
yum install <package name/s>
Used to install the latest version of a package or group of packages. If no package matches the
specified package name(s), they are assumed to be a shell glob, and any matches are then
installed.
yum update <package name/s>
Used to update the specified packages to the latest available version. If no package name/s are
specified, then yum will attempt to update all installed packages.
[main] Options
152
If the --obsoletes option is used (i.e. yum --obsoletes <package name/s> , yum will
process obsolete packages. As such, packages that are obsoleted accross updates will be
removed and replaced accordingly.
yum check-update
This command allows you to determine whether any updates are available for your installed
packages. yum returns a list of all package updates from all repositories if any are available.
yum remove <package name/s>
Used to remove specified packages, along with any other packages dependent on the packages
being removed.
yum provides <file name>
Used to determine which packages provide a specific file or feature.
yum search <keyword>
This command is used to find any packages containing the specified keyword in the description,
summary, packager and package name fields of RPMs in all repositories.
yum localinstall <absolute path to package name/s>
Used when using yumto install a package located locally in the machine.
12.3. yum Options
yumoptions are typically stated before specific yum commands; i.e. yum <options> <command>
<package name/s> . Most of these options can be set as default using the configuration file.
The following is a list of the most commonly-used yumoptions. For a complete list of available yum
options, refer to man yum.
-y
Answer "yes" to every question in the transaction.
-t
Sets yumto be "tolerant" of errors with regard to packages specified in the transaction. For
example, if you run yum update package1 package2 and package2 is already installed, yum
will continue to install package1.
--exclude=<package name>
Excludes a specific package by name or glob in a specific transaction.
12.4. Configuring yum
By default, yumis configured through /etc/yum.conf. The following is an example of a typical /
etc/yum.conf file:
[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
[main] Options
153
obsoletes=1
gpgcheck=1
plugins=1
metadata_expire=1800
[myrepo]
name=RHEL 5 $releasever - $basearch
baseurl=http://local/path/to/yum/repository/
enabled=1
A typical /etc/yum.conf file is made up of two types of sections: a [main] section, and a
repository section. There can only be one [main] section, but you can specify multiple repositories in
a single /etc/yum.conf.
12.4.1. [main] Options
The [main] section is mandatory, and there must only be one. For a complete list of options you can
use in the [main] section, refer to man yum.conf.
The following is a list of the most commonly-used options in the [main] section.
cachedir
This option specifies the directory where yumshould store its cache and database files. By default,
the cache directory of yumis /var/cache/yum.
keepcache=<1 or 0>
Setting keepcache=1 instructs yumto keep the cache of headers and packages after a
successful installation. keepcache=1 is the default.
reposdir=<absolute path to directory of .repo files>
This option allows you to specify a directory where .repo files are located. .repo files contain
repository information (similar to the [repository] section of /etc/yum.conf).
yumcollects all repository information from .repo files and the [repository] section of the
/etc/yum.conf file to create a master list of repositories to use for each transaction. Refer to
Sección 12.4.2, “ [repository] Options” for more information about options you can use for
both the [repository] section and .repo files.
If reposdir is not set, yumuses the default directory /etc/yum.repos.d.
gpgcheck=<1 or 0>
This disables/enables GPG signature checking on packages on all repositories, including local
package installation. The default is gpgcheck=0, which disables GPG checking.
If this option is set in the [main] section of the /etc/yum.conf file, it sets the GPG checking
rule for all repositories. However, you can also set this on individual repositories instead; i.e., you
can enable GPG checking on one repository while disabling it on another.
assumeyes=<1 or 0>
This determines whether or not yumshould prompt for confirmation of critical actions. The default
if assumeyes=0, which means yum will prompt you for confirmation.
If assumeyes=1 is set, yumbehaves in the same way that the command line option -y does.
tolerant=<1 or 0>
When enabled (tolerant=1), yum will be tolerant of errors on the command line with regard to
packages. This is similar to the yumcommand line option -t.
[main] Options
154
The default value for this is tolerant=0 (not tolerant).
exclude=<package name/s>
This option allows you to exclude packages by keyword during installation/updates. If you are
specifying multiple packages, this is a space-delimited list. Shell globs using wildcards (for
example, * and ?) are allowed.
retries=<number of retries>
This sets the number of times yumshould attempt to retrieve a file before returning an error.
Setting this to 0 makes yum retry forever. The default value is 6.
12.4.2. [repository] Options
The [repository] section of the /etc/yum.conf file contains information about a repository
yumcan use to find packages during package installation, updating and dependency resolution. A
repository entry takes the following form:
[repository ID]
name=repository name
baseurl=url, file or ftp://path to repository
You can also specify repository information in a separate .repo files (for example, rhel5.repo). The
format of repository information placed in .repo files is identical with the [repository] of /etc/
yum.conf.
.repo files are typically placed in /etc/yum.repos.d, unless you specify a different repository path
in the [main] section of /etc/yum.conf with reposdir=. .repo files and the /etc/yum.conf
file can contain multiple repository entries.
Each repository entry consists of the following mandatory parts:
[repository ID]
The repository ID is a unique, one-word string that serves as a repository identifier.
name=repository name
This is a human-readable string describing the repository.
baseurl=http, file or ftp://path
This is a URL to the directory where the repodatadirectory of a repository is located. If the
repository is local to the machine, use baseurl=file://path to local repository . If
the repository is located online using HTTP, use baseurl=http://link . If the repository is
online and uses FTP, use baseurl=ftp://link .
If a specific online repository requires basic HTTP authentication, you can specify your username
and password in the baseurl line by prepending it as username:password@link. For
example, if a repository on http://www.example.com/repo/ requires a username of "user" and
a password os "password", then the baseurl link can be specified as baseurl=http://
user:password@www.example.com/repo/.
The following is a list of options most commonly used in repository entries. For a complete list of
repository entries, refer to man yum.conf.
155
Useful yumVariables
gpgcheck=<1 or 0>
This disables/enables GPG signature checking a specific repository. The default is
gpgcheck=0, which disables GPG checking.
gpgkey=URL
This option allows you to point to a URL of the ASCII-armoured GPG key file for a
repository. This option is normally used if yumneeds a public key to verify a package and
the required key was not imported into the RPM database.
If this option is set, yum will automatically import the key from the specified URL. You
will be prompted before the key is installed unless you set assumeyes=1 (in the
[main] section of / etc/yum.conf) or -y (in a yumtransaction).
exclude=<package name/s>
This option is similar to the exclude option in the [main] section of /etc/yum.conf.
However, it only applies to the repository in which it is specified.
includepkgs=<package name/s>
This option is the opposite of exclude. When this option is set on a repository, yum will
only be able to see the specified packages in that repository. By default, all packages in
a repository are visible to yum.
12.5. Useful yum Variables
The following is a list of variables you can use for both yumcommands and yum configuration
files (i.e.
/etc/yum.conf and .repo files).
$releasever
This is replaced with the package's version, as listed in distroverpkg. This
defaults to the version of the redhat-release package.
$arch
This is replaced with your system's architecture, as listed by os.uname() in Python.
$basearch
This is replaced with your base architecture. For example, if $arch=i686 then
$basearch=i386.
$YUM0-9
This is replaced with the value of the shell environment variable of the same name. If
the shell environment variable does not exist, then the configuration file variable will
not be replaced.

Mais conteúdo relacionado

Mais procurados

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
 
Bundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMBundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMAlexander Shopov
 
Software Packaging with RPM
Software Packaging with RPMSoftware Packaging with RPM
Software Packaging with RPMSchalk Cronjé
 
Linux Basic Administration Commands Guide
Linux Basic Administration Commands GuideLinux Basic Administration Commands Guide
Linux Basic Administration Commands GuideVCP Muthukrishna
 
AIX Advanced Administration Knowledge Share
AIX Advanced Administration Knowledge ShareAIX Advanced Administration Knowledge Share
AIX Advanced Administration Knowledge Share.Gastón. .Bx.
 
RHEL Log-files, RPM, Backup & Recovery
RHEL Log-files, RPM, Backup & RecoveryRHEL Log-files, RPM, Backup & Recovery
RHEL Log-files, RPM, Backup & RecoveryAneesa Rahman
 
Additional resources repositories_rpm_forge - centos wiki
Additional resources repositories_rpm_forge - centos wikiAdditional resources repositories_rpm_forge - centos wiki
Additional resources repositories_rpm_forge - centos wikiCarlos Eduardo
 
Snort296x centos6x 2
Snort296x centos6x 2Snort296x centos6x 2
Snort296x centos6x 2Trinh Tuan
 
Asm disk group migration from
Asm disk group migration from Asm disk group migration from
Asm disk group migration from Anar Godjaev
 
J Ruby On Rails Presentation
J Ruby On Rails PresentationJ Ruby On Rails Presentation
J Ruby On Rails Presentationrailsconf
 
L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5William Lee
 
Module 13 - Troubleshooting
Module 13 - TroubleshootingModule 13 - Troubleshooting
Module 13 - TroubleshootingT. J. Saotome
 
LSOF Command Usage on RHEL 7
LSOF Command Usage on RHEL 7LSOF Command Usage on RHEL 7
LSOF Command Usage on RHEL 7VCP Muthukrishna
 

Mais procurados (20)

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
 
Aix commands
Aix commandsAix commands
Aix commands
 
12 yum
12  yum12  yum
12 yum
 
Bundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMBundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPM
 
Software Packaging with RPM
Software Packaging with RPMSoftware Packaging with RPM
Software Packaging with RPM
 
Linux Basic Administration Commands Guide
Linux Basic Administration Commands GuideLinux Basic Administration Commands Guide
Linux Basic Administration Commands Guide
 
Refcard en-a4
Refcard en-a4Refcard en-a4
Refcard en-a4
 
AIX Advanced Administration Knowledge Share
AIX Advanced Administration Knowledge ShareAIX Advanced Administration Knowledge Share
AIX Advanced Administration Knowledge Share
 
RHEL Log-files, RPM, Backup & Recovery
RHEL Log-files, RPM, Backup & RecoveryRHEL Log-files, RPM, Backup & Recovery
RHEL Log-files, RPM, Backup & Recovery
 
Additional resources repositories_rpm_forge - centos wiki
Additional resources repositories_rpm_forge - centos wikiAdditional resources repositories_rpm_forge - centos wiki
Additional resources repositories_rpm_forge - centos wiki
 
Snort296x centos6x 2
Snort296x centos6x 2Snort296x centos6x 2
Snort296x centos6x 2
 
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
 
Asm disk group migration from
Asm disk group migration from Asm disk group migration from
Asm disk group migration from
 
J Ruby On Rails Presentation
J Ruby On Rails PresentationJ Ruby On Rails Presentation
J Ruby On Rails Presentation
 
L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5
 
Module 13 - Troubleshooting
Module 13 - TroubleshootingModule 13 - Troubleshooting
Module 13 - Troubleshooting
 
101 1.2 boot the system
101 1.2 boot the system101 1.2 boot the system
101 1.2 boot the system
 
Oracle on Solaris
Oracle on SolarisOracle on Solaris
Oracle on Solaris
 
LSOF Command Usage on RHEL 7
LSOF Command Usage on RHEL 7LSOF Command Usage on RHEL 7
LSOF Command Usage on RHEL 7
 
Mancoosi
MancoosiMancoosi
Mancoosi
 

Destaque

Cisco 2960x switch password recovery
Cisco 2960x switch password recoveryCisco 2960x switch password recovery
Cisco 2960x switch password recoveryNetProtocol Xpert
 
VMware ESXi 6.0 Installation Process
VMware ESXi 6.0 Installation ProcessVMware ESXi 6.0 Installation Process
VMware ESXi 6.0 Installation ProcessNetProtocol Xpert
 
Vsphere esxi-vcenter-server-50-installation-setup-guide
Vsphere esxi-vcenter-server-50-installation-setup-guideVsphere esxi-vcenter-server-50-installation-setup-guide
Vsphere esxi-vcenter-server-50-installation-setup-guideamirzahur
 
Presentation vmware building “your cloud”
Presentation   vmware building “your cloud”Presentation   vmware building “your cloud”
Presentation vmware building “your cloud”solarisyourep
 
vCenter Operations 5: Level 300 training
vCenter Operations 5: Level 300 trainingvCenter Operations 5: Level 300 training
vCenter Operations 5: Level 300 trainingEric Sloof
 
VMworld 2013: vCenter Deep Dive
VMworld 2013: vCenter Deep Dive VMworld 2013: vCenter Deep Dive
VMworld 2013: vCenter Deep Dive VMworld
 
VMworld 2014: vCenter Server Architecture and Deployment Deep Dive
VMworld 2014: vCenter Server Architecture and Deployment Deep DiveVMworld 2014: vCenter Server Architecture and Deployment Deep Dive
VMworld 2014: vCenter Server Architecture and Deployment Deep DiveVMworld
 
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 switchIT Tech
 

Destaque (9)

Cisco 2960x switch password recovery
Cisco 2960x switch password recoveryCisco 2960x switch password recovery
Cisco 2960x switch password recovery
 
VMware ESXi 6.0 Installation Process
VMware ESXi 6.0 Installation ProcessVMware ESXi 6.0 Installation Process
VMware ESXi 6.0 Installation Process
 
Vsphere esxi-vcenter-server-50-installation-setup-guide
Vsphere esxi-vcenter-server-50-installation-setup-guideVsphere esxi-vcenter-server-50-installation-setup-guide
Vsphere esxi-vcenter-server-50-installation-setup-guide
 
Presentation vmware building “your cloud”
Presentation   vmware building “your cloud”Presentation   vmware building “your cloud”
Presentation vmware building “your cloud”
 
vCenter Operations 5: Level 300 training
vCenter Operations 5: Level 300 trainingvCenter Operations 5: Level 300 training
vCenter Operations 5: Level 300 training
 
VMworld 2013: vCenter Deep Dive
VMworld 2013: vCenter Deep Dive VMworld 2013: vCenter Deep Dive
VMworld 2013: vCenter Deep Dive
 
VMworld 2014: vCenter Server Architecture and Deployment Deep Dive
VMworld 2014: vCenter Server Architecture and Deployment Deep DiveVMworld 2014: vCenter Server Architecture and Deployment Deep Dive
VMworld 2014: vCenter Server Architecture and Deployment Deep Dive
 
Cisco ASR 1001-X Router
Cisco ASR 1001-X RouterCisco ASR 1001-X Router
Cisco ASR 1001-X Router
 
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
 

Semelhante a 12 yum

Yum package manager
Yum package managerYum package manager
Yum package managerLinuxConcept
 
Hadoop installation and Running KMeans Clustering with MapReduce Program on H...
Hadoop installation and Running KMeans Clustering with MapReduce Program on H...Hadoop installation and Running KMeans Clustering with MapReduce Program on H...
Hadoop installation and Running KMeans Clustering with MapReduce Program on H...Titus Damaiyanti
 
Linux packege manager
Linux packege managerLinux packege manager
Linux packege managerInfoExcavator
 
package mangement
package mangementpackage mangement
package mangementARYA TM
 
Building a linux kernel
Building a linux kernelBuilding a linux kernel
Building a linux kernelRaghu nath
 
Hadoop single node installation on ubuntu 14
Hadoop single node installation on ubuntu 14Hadoop single node installation on ubuntu 14
Hadoop single node installation on ubuntu 14jijukjoseph
 
InstallingRoRinLinux
InstallingRoRinLinuxInstallingRoRinLinux
InstallingRoRinLinuxtutorialsruby
 
InstallingRoRinLinux
InstallingRoRinLinuxInstallingRoRinLinux
InstallingRoRinLinuxtutorialsruby
 
Basic linux architecture
Basic linux architectureBasic linux architecture
Basic linux architectureRohit Kumar
 

Semelhante a 12 yum (20)

Yum package manager
Yum package managerYum package manager
Yum package manager
 
Hadoop installation and Running KMeans Clustering with MapReduce Program on H...
Hadoop installation and Running KMeans Clustering with MapReduce Program on H...Hadoop installation and Running KMeans Clustering with MapReduce Program on H...
Hadoop installation and Running KMeans Clustering with MapReduce Program on H...
 
How To List YUM Packages
How To List YUM PackagesHow To List YUM Packages
How To List YUM Packages
 
Linux packege manager
Linux packege managerLinux packege manager
Linux packege manager
 
Linux packege manager
Linux packege managerLinux packege manager
Linux packege manager
 
Linux shell scripting
Linux shell scriptingLinux shell scripting
Linux shell scripting
 
package mangement
package mangementpackage mangement
package mangement
 
Backup and recovery
Backup and recoveryBackup and recovery
Backup and recovery
 
Building a linux kernel
Building a linux kernelBuilding a linux kernel
Building a linux kernel
 
Linux file
Linux fileLinux file
Linux file
 
CSV to XML Converter
CSV to XML ConverterCSV to XML Converter
CSV to XML Converter
 
Centos config
Centos configCentos config
Centos config
 
Hadoop single node installation on ubuntu 14
Hadoop single node installation on ubuntu 14Hadoop single node installation on ubuntu 14
Hadoop single node installation on ubuntu 14
 
Apache solr configuration with drupal 7
Apache solr configuration with drupal 7Apache solr configuration with drupal 7
Apache solr configuration with drupal 7
 
InstallingRoRinLinux
InstallingRoRinLinuxInstallingRoRinLinux
InstallingRoRinLinux
 
InstallingRoRinLinux
InstallingRoRinLinuxInstallingRoRinLinux
InstallingRoRinLinux
 
Hadoop completereference
Hadoop completereferenceHadoop completereference
Hadoop completereference
 
Unix Administration 2
Unix Administration 2Unix Administration 2
Unix Administration 2
 
Basic linux architecture
Basic linux architectureBasic linux architecture
Basic linux architecture
 
Linux filesystemhierarchy
Linux filesystemhierarchyLinux filesystemhierarchy
Linux filesystemhierarchy
 

Mais de Aprende Viendo

44 seguridad y se linux
44  seguridad y se linux44  seguridad y se linux
44 seguridad y se linuxAprende Viendo
 
43 aseguramiento de su red
43  aseguramiento de su red43  aseguramiento de su red
43 aseguramiento de su redAprende Viendo
 
42 seguridad y autenticación
42  seguridad y autenticación42  seguridad y autenticación
42 seguridad y autenticaciónAprende Viendo
 
41 parámetros y módulos generales
41  parámetros y módulos generales41  parámetros y módulos generales
41 parámetros y módulos generalesAprende Viendo
 
40 configuración del kernel y dispositivos
40  configuración del kernel y dispositivos40  configuración del kernel y dispositivos
40 configuración del kernel y dispositivosAprende Viendo
 
38 reunir información del sistema
38  reunir información del sistema38  reunir información del sistema
38 reunir información del sistemaAprende Viendo
 
37 supervisión del sistema
37  supervisión del sistema37  supervisión del sistema
37 supervisión del sistemaAprende Viendo
 
36 archivos de registro
36  archivos de registro36  archivos de registro
36 archivos de registroAprende Viendo
 
34 configuración de la impresora
34  configuración de la impresora34  configuración de la impresora
34 configuración de la impresoraAprende Viendo
 
32 configuración del sistema x window
32  configuración del sistema x window32  configuración del sistema x window
32 configuración del sistema x windowAprende Viendo
 
31 el sistema x window
31  el sistema x window31  el sistema x window
31 el sistema x windowAprende Viendo
 
46 customizing se linux policy
46  customizing se linux policy46  customizing se linux policy
46 customizing se linux policyAprende Viendo
 
45 trabajar con se linux
45  trabajar con  se linux45  trabajar con  se linux
45 trabajar con se linuxAprende Viendo
 
29 configuración de la fecha y hora
29  configuración de la fecha y hora29  configuración de la fecha y hora
29 configuración de la fecha y horaAprende Viendo
 
27 configuración del sistema
27  configuración del sistema27  configuración del sistema
27 configuración del sistemaAprende Viendo
 
28 el directorio sysconfig
28  el directorio sysconfig28  el directorio sysconfig
28 el directorio sysconfigAprende Viendo
 
25 protocolo ligero de acceso a directorios ldap
25  protocolo ligero de acceso a directorios ldap25  protocolo ligero de acceso a directorios ldap
25 protocolo ligero de acceso a directorios ldapAprende Viendo
 

Mais de Aprende Viendo (20)

44 seguridad y se linux
44  seguridad y se linux44  seguridad y se linux
44 seguridad y se linux
 
43 aseguramiento de su red
43  aseguramiento de su red43  aseguramiento de su red
43 aseguramiento de su red
 
42 seguridad y autenticación
42  seguridad y autenticación42  seguridad y autenticación
42 seguridad y autenticación
 
41 parámetros y módulos generales
41  parámetros y módulos generales41  parámetros y módulos generales
41 parámetros y módulos generales
 
40 configuración del kernel y dispositivos
40  configuración del kernel y dispositivos40  configuración del kernel y dispositivos
40 configuración del kernel y dispositivos
 
39 o profile
39  o profile39  o profile
39 o profile
 
38 reunir información del sistema
38  reunir información del sistema38  reunir información del sistema
38 reunir información del sistema
 
37 supervisión del sistema
37  supervisión del sistema37  supervisión del sistema
37 supervisión del sistema
 
36 archivos de registro
36  archivos de registro36  archivos de registro
36 archivos de registro
 
35 automated tasks
35  automated tasks35  automated tasks
35 automated tasks
 
34 configuración de la impresora
34  configuración de la impresora34  configuración de la impresora
34 configuración de la impresora
 
33 usuarios y grupos
33  usuarios y grupos33  usuarios y grupos
33 usuarios y grupos
 
32 configuración del sistema x window
32  configuración del sistema x window32  configuración del sistema x window
32 configuración del sistema x window
 
31 el sistema x window
31  el sistema x window31  el sistema x window
31 el sistema x window
 
46 customizing se linux policy
46  customizing se linux policy46  customizing se linux policy
46 customizing se linux policy
 
45 trabajar con se linux
45  trabajar con  se linux45  trabajar con  se linux
45 trabajar con se linux
 
29 configuración de la fecha y hora
29  configuración de la fecha y hora29  configuración de la fecha y hora
29 configuración de la fecha y hora
 
27 configuración del sistema
27  configuración del sistema27  configuración del sistema
27 configuración del sistema
 
28 el directorio sysconfig
28  el directorio sysconfig28  el directorio sysconfig
28 el directorio sysconfig
 
25 protocolo ligero de acceso a directorios ldap
25  protocolo ligero de acceso a directorios ldap25  protocolo ligero de acceso a directorios ldap
25 protocolo ligero de acceso a directorios ldap
 

Último

Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 

Último (20)

Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 

12 yum

  • 1. YUM (Yellowdog Updater Modified) Yellowdog Update, Modified (YUM)is a package manager that was developed by Duke University to improve the installation of RPMs. yumsearches numerous repositories for packages and their dependencies so they may be installed together in an effort to alleviate dependency issues. Red Hat Enterprise Linux 5.2 uses yumto fetch packages and install RPMs. up2date is now deprecated in favor of yum(Yellowdog Updater Modified). The entire stack of tools which installs and updates software in Red Hat Enterprise Linux 5.2 is now based on yum. This includes everything, from the initial installation via Anaconda to host software management tools like pirut. yumalso allows system administrators to configure a local (i.e. available over a local network) repository to supplement packages provided by Red Hat. This is useful for user groups that use applications and packages that are not officiallysupported by Red Hat. Aside from being able to supplement available packages for local users, using a local yum repository also saves bandwidth for the entire network. Further, clients that use local yumrepositories do not need to be registered individually to install or update the latest packages from Red Hat Network. 12.1. Setting Up a Yum Repository To set up a repository for Red Hat Enterprise Linux packages, follow these steps: 1. Install the createrepo package: ~]# yum install createrepo 2. Copy all the packages you want to provide in the repository into one directory (/mnt/ local_repo for example). 3. Run createrepo on that directory (for example, createrepo /mnt/local_repo). This will create the necessary metadata for your Yum repository. 12.2. yum Commands yumcommands are typically run as yum <command> <package name/s> . By default, yum will automatically attempt to check all configured repositories to resolve all package dependencies during an installation/upgrade. The following is a list of the most commonly-used yum commands. For a complete list of available yum commands, refer to man yum. yum install <package name/s> Used to install the latest version of a package or group of packages. If no package matches the specified package name(s), they are assumed to be a shell glob, and any matches are then installed. yum update <package name/s> Used to update the specified packages to the latest available version. If no package name/s are specified, then yum will attempt to update all installed packages.
  • 2. [main] Options 152 If the --obsoletes option is used (i.e. yum --obsoletes <package name/s> , yum will process obsolete packages. As such, packages that are obsoleted accross updates will be removed and replaced accordingly. yum check-update This command allows you to determine whether any updates are available for your installed packages. yum returns a list of all package updates from all repositories if any are available. yum remove <package name/s> Used to remove specified packages, along with any other packages dependent on the packages being removed. yum provides <file name> Used to determine which packages provide a specific file or feature. yum search <keyword> This command is used to find any packages containing the specified keyword in the description, summary, packager and package name fields of RPMs in all repositories. yum localinstall <absolute path to package name/s> Used when using yumto install a package located locally in the machine. 12.3. yum Options yumoptions are typically stated before specific yum commands; i.e. yum <options> <command> <package name/s> . Most of these options can be set as default using the configuration file. The following is a list of the most commonly-used yumoptions. For a complete list of available yum options, refer to man yum. -y Answer "yes" to every question in the transaction. -t Sets yumto be "tolerant" of errors with regard to packages specified in the transaction. For example, if you run yum update package1 package2 and package2 is already installed, yum will continue to install package1. --exclude=<package name> Excludes a specific package by name or glob in a specific transaction. 12.4. Configuring yum By default, yumis configured through /etc/yum.conf. The following is an example of a typical / etc/yum.conf file: [main] cachedir=/var/cache/yum keepcache=0 debuglevel=2 logfile=/var/log/yum.log distroverpkg=redhat-release tolerant=1 exactarch=1
  • 3. [main] Options 153 obsoletes=1 gpgcheck=1 plugins=1 metadata_expire=1800 [myrepo] name=RHEL 5 $releasever - $basearch baseurl=http://local/path/to/yum/repository/ enabled=1 A typical /etc/yum.conf file is made up of two types of sections: a [main] section, and a repository section. There can only be one [main] section, but you can specify multiple repositories in a single /etc/yum.conf. 12.4.1. [main] Options The [main] section is mandatory, and there must only be one. For a complete list of options you can use in the [main] section, refer to man yum.conf. The following is a list of the most commonly-used options in the [main] section. cachedir This option specifies the directory where yumshould store its cache and database files. By default, the cache directory of yumis /var/cache/yum. keepcache=<1 or 0> Setting keepcache=1 instructs yumto keep the cache of headers and packages after a successful installation. keepcache=1 is the default. reposdir=<absolute path to directory of .repo files> This option allows you to specify a directory where .repo files are located. .repo files contain repository information (similar to the [repository] section of /etc/yum.conf). yumcollects all repository information from .repo files and the [repository] section of the /etc/yum.conf file to create a master list of repositories to use for each transaction. Refer to Sección 12.4.2, “ [repository] Options” for more information about options you can use for both the [repository] section and .repo files. If reposdir is not set, yumuses the default directory /etc/yum.repos.d. gpgcheck=<1 or 0> This disables/enables GPG signature checking on packages on all repositories, including local package installation. The default is gpgcheck=0, which disables GPG checking. If this option is set in the [main] section of the /etc/yum.conf file, it sets the GPG checking rule for all repositories. However, you can also set this on individual repositories instead; i.e., you can enable GPG checking on one repository while disabling it on another. assumeyes=<1 or 0> This determines whether or not yumshould prompt for confirmation of critical actions. The default if assumeyes=0, which means yum will prompt you for confirmation. If assumeyes=1 is set, yumbehaves in the same way that the command line option -y does. tolerant=<1 or 0> When enabled (tolerant=1), yum will be tolerant of errors on the command line with regard to packages. This is similar to the yumcommand line option -t.
  • 4. [main] Options 154 The default value for this is tolerant=0 (not tolerant). exclude=<package name/s> This option allows you to exclude packages by keyword during installation/updates. If you are specifying multiple packages, this is a space-delimited list. Shell globs using wildcards (for example, * and ?) are allowed. retries=<number of retries> This sets the number of times yumshould attempt to retrieve a file before returning an error. Setting this to 0 makes yum retry forever. The default value is 6. 12.4.2. [repository] Options The [repository] section of the /etc/yum.conf file contains information about a repository yumcan use to find packages during package installation, updating and dependency resolution. A repository entry takes the following form: [repository ID] name=repository name baseurl=url, file or ftp://path to repository You can also specify repository information in a separate .repo files (for example, rhel5.repo). The format of repository information placed in .repo files is identical with the [repository] of /etc/ yum.conf. .repo files are typically placed in /etc/yum.repos.d, unless you specify a different repository path in the [main] section of /etc/yum.conf with reposdir=. .repo files and the /etc/yum.conf file can contain multiple repository entries. Each repository entry consists of the following mandatory parts: [repository ID] The repository ID is a unique, one-word string that serves as a repository identifier. name=repository name This is a human-readable string describing the repository. baseurl=http, file or ftp://path This is a URL to the directory where the repodatadirectory of a repository is located. If the repository is local to the machine, use baseurl=file://path to local repository . If the repository is located online using HTTP, use baseurl=http://link . If the repository is online and uses FTP, use baseurl=ftp://link . If a specific online repository requires basic HTTP authentication, you can specify your username and password in the baseurl line by prepending it as username:password@link. For example, if a repository on http://www.example.com/repo/ requires a username of "user" and a password os "password", then the baseurl link can be specified as baseurl=http:// user:password@www.example.com/repo/. The following is a list of options most commonly used in repository entries. For a complete list of repository entries, refer to man yum.conf.
  • 5. 155 Useful yumVariables gpgcheck=<1 or 0> This disables/enables GPG signature checking a specific repository. The default is gpgcheck=0, which disables GPG checking. gpgkey=URL This option allows you to point to a URL of the ASCII-armoured GPG key file for a repository. This option is normally used if yumneeds a public key to verify a package and the required key was not imported into the RPM database. If this option is set, yum will automatically import the key from the specified URL. You will be prompted before the key is installed unless you set assumeyes=1 (in the [main] section of / etc/yum.conf) or -y (in a yumtransaction). exclude=<package name/s> This option is similar to the exclude option in the [main] section of /etc/yum.conf. However, it only applies to the repository in which it is specified. includepkgs=<package name/s> This option is the opposite of exclude. When this option is set on a repository, yum will only be able to see the specified packages in that repository. By default, all packages in a repository are visible to yum. 12.5. Useful yum Variables The following is a list of variables you can use for both yumcommands and yum configuration files (i.e. /etc/yum.conf and .repo files). $releasever This is replaced with the package's version, as listed in distroverpkg. This defaults to the version of the redhat-release package. $arch This is replaced with your system's architecture, as listed by os.uname() in Python. $basearch This is replaced with your base architecture. For example, if $arch=i686 then $basearch=i386. $YUM0-9 This is replaced with the value of the shell environment variable of the same name. If the shell environment variable does not exist, then the configuration file variable will not be replaced.