Yum: Difference between revisions
(→list) |
|||
Line 16: | Line 16: | ||
The configuration file contains, among other things, the location of the log file (by default <tt>/var/log/yum.log</tt>). | The configuration file contains, among other things, the location of the log file (by default <tt>/var/log/yum.log</tt>). | ||
<tt>yum</tt> looks for repository definitions, which are <tt>.repo</tt> files kept in <tt>/etc/yum.repos.d/</tt>. All files with the .repo file extension in this directory are read by <tt>yum</tt>. | <tt>yum</tt> looks for repository definitions, which are <tt>.repo</tt> files kept in <tt>/etc/yum.repos.d/</tt>. All files with the .repo file extension in this directory are read by <tt>yum</tt>. More information about configured repository can be obtained with <tt>[[#repolist|yum repolist]]</tt>. | ||
=Commands= | =Commands= |
Revision as of 20:35, 4 April 2017
External
Internal
Overview
yum is an interactive, rpm-based package manager. It can automatically perform system updates, including dependency analysis and obsolete processing based on repository metadata. It can also perform installation of new packages, removal of old packages and perform queries on the installed and/or available packages among many other commands/services.
yum is configured in /etc/yum.conf.
The configuration file contains, among other things, the location of the log file (by default /var/log/yum.log).
yum looks for repository definitions, which are .repo files kept in /etc/yum.repos.d/. All files with the .repo file extension in this directory are read by yum. More information about configured repository can be obtained with yum repolist.
Commands
list
Used to list various information about available packages - packages available from the repositories described in /etc/yum.repos.d/*.repo.
repolist
Displays information about configured repositories - repositories described in /etc/yum.repos.d/*.repo files.
yum repolist [-v] [repository-id]
where "repository-id" is the repository identifier declared between square brackets in the .repo file.
Recipes
Queries
Find Packages that Might Contain a Certain Command
yum provides sealert
Find Whether a Package is Installed
yum list installed | grep <package-name>
Example of positive hit:
[root@ns ~]# yum list installed | grep httpd httpd.x86_64 2.4.6-40.el7 @rhel-7-server-rpms httpd-tools.x86_64 2.4.6-40.el7 @rhel-7-server-rpms
List of Everything Installed
yum info
Information about a Specific Package
yum info <package-name>
This can be used for information on packages that already have been installed or on package that has't been installed yet. If the package has been installed, yum info will report Installed Packages, otherwise will say Available.
Generic Search
yum search <string>
Update All Packages
yum -y update
Update a Package
yum update <package-name>
Install a Package
yum install <package-name>
Uninstall a Package
yum remove <package-name>