Linux yum install
ИТ База знаний
Полезно
— Узнать IP — адрес компьютера в интернете
— Онлайн генератор устойчивых паролей
— Онлайн калькулятор подсетей
— Калькулятор инсталляции IP — АТС Asterisk
— Руководство администратора FreePBX на русском языке
— Руководство администратора Cisco UCM/CME на русском языке
— Руководство администратора по Linux/Unix
Навигация
Серверные решения
Телефония
FreePBX и Asterisk
Настройка программных телефонов
Корпоративные сети
Протоколы и стандарты
Популярное и похожее
Пошаговый ввод в домен Windows 10
Погружение в Iptables – теория и настройка
Hyper-V: исправляем ошибку 32788
Решаем ошибку 18456 в SQL
Топ – 20 полезных команд yum
Менеджер пакетов в CentOS
Сегодня хотелось бы кратко описать команды менеджера пакетов yum — официальная сборка FreePBX основана на CentOS, в котором yum установлен по умолчанию. Он пригодится для установки, удаления, обновления пакетов.
Установка пакета
К примеру, для установки пакета mc нужно ввести команду yum install mc . После ввода команды, система попросит подтверждение. Чтобы подтверждение было одобрено по умолчанию, нужно добавить ключ -y , к примеру yum –y install mc :
Удаление пакета
Для удаления пакета, соответственно, нужно ввести команду yum remove mc . Точно также можно использовать ключ для подтверждения -y :
Обновление пакета
Предположим – у вас старая версия mysql и вам необходимо ее обновить – тут используется команда update. Целиком команда будет выглядеть так: yum update mysql .
Поиск пакета
Если хотите проверить наличие установленного конкретного пакета на сервере и доступные для установки – используйте команду list. Целиком команда будет выглядеть так: yum list mysql . Также можно указать точную версию пакета, если вам требуется более скрупулезный поиск.
Вывод информации о пакете
Если хотите вывести информацию о пакете – используйте команду info. Целиком команда будет выглядеть так: yum info mc .
Вывод информации о всех доступных и установленных пакетах
Для этого используется команда list с модификаторами. Для вывода доступных пакетов: yum list | less , а для вывода всех установленных — yum list installed | less
Проверка доступных обновлений для пакетов и само обновление
Для проверки служит команда check-update, а для обновления — update. Ниже три примера использования команд:
- yum check-update mysql — проверка обновлений пакета mysql;
- yum list updates — вывод списка обновлений;
- yum update mc — обновление Midnight Commander’а;
- yum –y update — обновление всех установленных пакетов;
Групповые пакеты и операции с ними
В Линуксе некоторые пакеты собраны в так называемые групповые пакеты – к примеру, DNS Name Server, Editors, Java Development и так далее. С помощью yum можно устанавливать групповые пакеты с помощью команды groupinstall — пример далее yum groupinstall ‘Clustering . Коротко опишу остальные команды для манипуляций с групповыми пакетами:
- yum grouplist — вывод всех доступных к установке групповых пакетов;
- yum groupupdate ‘Base’ — обновление конкретного группового пакета, в данном случае – Base;
- yum groupremove ‘Editors’ — удаление группового пакета;
Репозитории в yum
Поиск пакетов происходит в так называемых репозиториях, ниже приведу несколько команд для работы с ними – принцип тот же, что и с пакетами (команды list, к примеру). Вывод всех активных репозиториев производится с помощью команды yum repolist , вывод также и неактивных репозиториев – с помощью команды yum repolist all
Для установки пакета из конкретного репозитория, неважно, активного или неактивного, используется ключ —enablerepo . Как пример – установка phpmyadmin: yum –enablerepo=epel install phpmyadmin
Терминал в yum и история
Если Вы собираетесь проводить очень много операций с пакетами, то можно сразу зайти в оболочку yum с помощью команды yum shell и с помощью уже известных вам команд (только уже без первых трёх букв, соответственно), Вы можете устанавливатьудалятьобновлятьwhatever пакеты. Также интересной фичей является возможность посмотреть историю установок в yum – с помощью команды yum history .
Полезна ли Вам эта статья?
Пожалуйста, расскажите почему?
Нам жаль, что статья не была полезна для вас 🙁 Пожалуйста, если не затруднит, укажите по какой причине? Мы будем очень благодарны за подробный ответ. Спасибо, что помогаете нам стать лучше!
Подпишитесь на нашу еженедельную рассылку, и мы будем присылать самые интересные публикации 🙂 Просто оставьте свои данные в форме ниже.
Менеджер пакетов YUM
YUM (Yellowdog Updater Modified) — это менеджер пакетов с открытым исходным кодом для Linux-систем, использующих RPM (RedHat Package Manager), доступный как из командной строки, так и из графического интерфейса. Он предназначен для установки, обновления, удаления или поиска программного обеспечения. YUM определяет необходимые зависимости между пакетами и использует ряд сторонних репозиториев для автоматической установки пакетов.
Установка пакета
Для установки пакета используется команда install. Например, для установки Firefox запустите следующую команду, и YUM автоматически установит Firefox и все зависимые пакеты.
Прежде чем установить какой-либо пакет, команда запросит подтверждение. Если вам требуется автоматическая установка без запроса подтверждения, воспользуйтесь опцией -y:
Удаление пакета
Для полного удаления пакета и всех зависимых пакетов используется команда remove:
Поиск пакетов
Для поиска конкретного пакета по имени воспользуйтесь функцией list. Например, для поиска пакета с именем openssh выполните команду:
# yum list openssh
Для более точного поиска укажите имя пакета с версией, если вы ее знаете. Например, для поиска конкретной версии openssh.x86_64 выполните команду:
Без опций команда выводит список всех доступных в базе данных YUM список пакетов будет очень большим, поэтому воспользуемся командой less:
Для вывода всех установленных пакетов воспользуйтесь опцией installed:
Если вы не помните точного названия пакета, используйте функцию search для поиска всех доступных пакетов, соответствующих заданной строке:
Информация о пакете
Если перед установкой пакета вы хотите больше о нем узнать, воспользуйтесь командой info:
Функция provides
Функция provides используется для поиска пакета, к которому относится определенный файл. Например, если вам требуется узнать, в каком пакете есть файл /etc/httpd/conf/httpd.conf, выполните команду:
Обновление системы
Чтобы проверить наличие обновлений установленных в системе пакетов, воспользуйтесь командой check-update:
Для поддержания актуальной версии системы со всеми необходимыми обновлениями безопасности и бинарных пакетов выполните команду update. Она автоматически установит все необходимые патчи и обновления:
Вывод групп пакетов
В Linux несколько пакетов могут объединяться в группы. Вместо установки отдельных пакетов можно установить всю группу целиком. Для вывода списка всех доступных групп воспользуйтесь командой:
Установка групп пакетов
Для установки группы пакетов используется команда groupinstall. Например, для установки группы “Стандартный веб-сервер“ выполните команду:
Обновление групп пакетов
Для обновления установленной группы пакетов воспользуйтесь командой groupupdate, как показано ниже.
Удаление групп пакетов
Удаление установленной группы пакетов осуществляется командой groupremove:
Вывод списка репозиториев
Чтобы показать список всех подключенных репозиториев YUM в вашей системе, воспользуйтесь следующей командой:
Для включения в список отключенных репозиториев укажите опцию all:
Установка пакета из заданного репозитория
Для установки конкретного пакета из заданного репозитория, подключенного или отключённого, нужно выполнить команду yum с опцией —enablerepo. Например, для установки пакета PhpMyAdmin EPEL:
Интерактивная оболочка YUM
В утилите YUM есть своя оболочка, где можно выполнять рассмотренные выше команды. Она вызывается командой shell:
Очистка кэша YUM
По умолчанию YUM хранит все кэшированные данные пакетов подключенных репозиториев в директории /var/cache/yum/ и соответствующих поддиректориях. Для очистки кэша и освобождения свободного места нужно регулярно запускать следующую команду:
Просмотр истории YUM
Для просмотра всех недавних действий yum необходимо выполнить следующую команду:
Заключение
Мы постарались охватить все основные команды yum, необходимые для работы с пакетами в вашей системе, и привести примеры их использования. Если вам потребуется более подробная информация, ее можно найти в соответствующих man-страницах.
Если вы нашли ошибку, пожалуйста, выделите фрагмент текста и нажмите Ctrl+Enter.
Linux yum command
On Unix-like operating systems, the yum command is an interactive, rpm-based package manager.
Description
yum stands for «Yellowdog Updater Modified». 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 or available packages among other commands/services (see below). The yum command is similar to other high level package managers like apt-get and smart.
Syntax
command may be one of:
Unless the —help or -h option is given, one of the above commands must be present.
Command Descriptions
If run without any packages, update will update every currently installed package. If one or more packages or package globs are specified, yum will only update the listed packages. While updating packages, yum will ensure that all dependencies are satisfied. If the packages or globs specified match to packages that are not currently installed then update will not install them. update operates on groups, files, provides and filelists just like the «install» command.
If the main obsoletes configure option is true (default) or the —obsoletes flag is present, yum will include package obsoletes in its calculations; this makes it better for distro-version changes, for example: upgrading from somelinux 8.0 to somelinux 9.
Note that «update» works on installed packages first, and only if there are no matches does it look for available packages. The difference is most noticeable when you do «update foo-1-2» which will act exactly as «update foo» if foo-1-2 is installed. You can use the «update-to» if you’d prefer that nothing happen in the above case.
Synchronizes the installed package set with the latest packages available; this is done by either obsoleting, upgrading or downgrading as appropriate. This option will «normally» do the same thing as the upgrade command, however, if you have the package FOO installed at version 4, and the latest available is only version 3, then this command will downgrade FOO to version 3.
If you give the optional argument «full«, then the command will also reinstall packages where the install checksum and the available checksum do not match. And remove old packages (can be used to sync. rpmdb versions). The optional argument «different» can be used to specify the default operation.
This command does not perform operations on groups, local packages or negative selections.
Used to remove the specified packages from the system as well as removing any packages which depend on the package being removed. remove operates on groups, files, provides and filelists just like the «install» command.
Note that «yum» is included in the protected_packages configuration by default. So you can’t accidentally remove yum itself.
This option is used to find packages when you know something about the package but aren’t sure of its name. By default, search will try searching just package names and summaries, but if that «fails» it will then try descriptions and url.
yum search orders the results so that those packages matching more terms will appear first.
You can force searching everything by specifying «all» as the first argument.
A command, new in 3.4.2, that collects all the subcommands that act on groups together.
The «group install» is used to install all of the individual packages in a group, of the specified types (this works as if you’d taken each of those package names and put them on the command line for a «yum install» command). The group_package_types configuration option specifies which types will be installed.
The «group update» is just an alias for groupinstall, which will do the right thing because «yum install X» and «yum update X» do the same thing, when X is already installed.
The «group list» is used to list the available groups from all yum repositories. Groups are marked as «installed» if all mandatory packages are installed, or if a group doesn’t have any mandatory packages then it is installed if any of the optional or default package are installed. The optional «hidden» argument will also list groups marked as not being «user visible». If you pass the -v option, to enable verbose mode, then the groupids are displayed.
The «group remove» is used to remove all of the packages in a group, unlike «groupinstall» this will remove everything regardless of group_package_types. It is worth pointing out that packages can be in more than one group, so «group install X Y» followed by «group remove Y» does not do give you the same result as «group install X«.
The «groupremove_leaf_only» configuration changes the behaviour of this command to only remove packages which aren’t required by something else.
The «group info» is used to give the description and package list of a group (and which type those packages are marked as). Note that you can use the yum-filter-data and yum-list-data plugins to get/use the data the other way around (i.e. what groups own packages need updating). If you pass the -v option, to enable verbose mode, then the package names are matched against installed/available packages similar to the list command.
Produces a list of configured repositories. The default is to list all enabled repositories. If you pass -v for verbose mode, more information is listed. If the first argument is ‘enabled‘, ‘disabled‘ or ‘all‘ then the command will list those types of repositories.
You can pass repo id or name arguments, or wildcards which to match against both of those. However, if the id or name matches exactly then the repo will be listed even if you are listing enabled repositories and it is disabled.
In non-verbose mode the first column will start with a ‘*‘ if the repo has metalink data and the latest metadata is not local. For non-verbose mode the last column will also display the number of packages in the repo and (if there are any user specified excludes) the number of packages excluded.
One last special feature of repolist, is that if you are in non-verbose mode then yum ignores any repo errors and output the information it can get (Eg. «yum clean all; yum -C repolist» will output something, although the package counts/etc. will be zeroed out).
Produces a «version» of the rpmdb, and of the enabled repositories if «all» is given as the first argument. You can also specify version groups in the version-groups config file. If you specify -v for verbose mode, more information is listed. The version is calculated by taking a sha1 hash of the packages (in sorted order), and the checksum_type/checksum_data entries from the yumdb. Note that this rpmdb version is now also used significantly within yum (especially in the yum history).
The version command will now show «groups» of packages as a separate version, and so takes sub-commands:
«version grouplist» — List the defined version groups.
«version groupinfo» — Get the complete list of packages within one or more version groups.
«version installed» — This sub-command is the default, only show the version information for installed packages.
«version available» — Only show the version information for available packages.
«version all» — Show the version information for installed and available packages.
«version nogroups | nogroups-*» — Just show the main version information.
«version group-*» — Just show the grouped version information, if more arguments are given then only show the data for those groups.
The history command allows the user to view what has happened in past transactions (assuming the history_record config. option is set). You can use info/list/packages-list/summary to view what happened, undo/redo/rollback to act on that information and new to start a new history file.
The info/list/summary commands take either a transaction id or a package (with wildcards, as in Specifying package names), all three can also be passed no arguments. The list can be passed the keyword «all» to list all the transactions.
The packages-list command takes a package (with wildcards, as in Specifying package names).
The undo/redo/rollback commands take either a single transaction id or the keyword last and an offset from the last transaction (Eg. if you’ve done 250 transactions, «last» refers to transaction 250, and «last-4» refers to transaction 246).
The undo/redo commands act on the specified transaction, undo’ing or repeating the work of that transaction. While the rollback command will undo all transactions upto the point of the specified transaction. For example, if you have 3 transactions, where package A; B and C where installed respectively. Then «undo 1» will try to remove pacakge A, «redo 1» will try to install package A (if it is not still installed), and «rollback 1» will try to remove packages B and C. Note that after a «rollback 1» you will have a fourth transaction, although the ending rpmdb version (see: yum version) should be the same in transactions 1 and 4.
The addon-info command takes a transaction ID, and the packages-list command takes a package (with wildcards).
In «history list» you can change the behaviour of the 2nd column via the configuration option history_list_view.
In «history list» output the Altered column also gives some extra information if there was something not good with the transaction (this is also shown at the end of the package column in the packages-list command).
> — The rpmdb was changed, outside yum, after the transaction.
Установка пакетов в CentOS 7
Нам довольно часто приходится устанавливать различные программы. По умолчанию в системе есть только самое необходимое, а если вам понадобится что-либо специфическое, то вам придется устанавливать программы вручную. Установка программ Linux в некотором смысле проще, чем в Windows. Здесь большинство необходимых программ находятся в официальных репозиториях и для их установки или обновления достаточно выполнить несколько команд.
В этой статье мы рассмотрим как выполняется установка пакетов CentOS 7. Рассмотрим основы работы с пакетным менеджером yum, его возможности, поиск и разрешение зависимостей пакетов.
Что такое YUM?
YUM ( Yellowdog Updater Modified ) — это пакетный менеджер с открытым исходным кодом, разработанный в компании RedHat для работы с пакетами в формате RPM. С помощью него пользователи и системные администраторы могут устанавливать, удалять и обновлять пакеты в системах, основанных на RedHat.
Программа распространяется под лицензией GPL (General Public License) и любой пользователь может получить доступ к исходникам или даже улучшить код. Пакетный менеджер поддерживает подключение сторонних репозиториев и разрешение зависимостей для установки пакетов. Для улучшения работы Yum могут быть загружены различные плагины.
Утилита работает в консоли, а ее синтаксис очень прост:
$ sudo yum опции команда имя_пакета
Сначала рассмотрим основные команды пакетного менеджера:
- install — установить пакет;
- update — обновить пакет или систему;
- update-to — обновить пакет до версии;
- update-minimal — обновлять только исправления ошибок;
- upgrade — полное обновление с обработкой дополнительных возможностей пакетов и их зависимостей;
- distro-sync — синхронизировать состояния системы или пакета с репозиторием. Например, если была установлена версия пакета 4, а в репозитории только 3, то будет выполнено понижение версии;
- remove — удалить пакет;
- autoremove — очистить больше ненужные пакеты;
- list — показать список пакетов;
- provides — поиск пакета по функциональности;
- search — поиск пакета по имени;
- info — информация о пакете;
- clean — очистить кэш пакетного менеджера;
- groups — управление группами пакетов;
- reinstall — переустановить пакет;
- downgrade — понизить версию пакета;
- deplist — вывести все зависимости пакета;
- repolist — отобразить список репозиториев;
- fssnapshot — управление снимками состояния системы;
- check — проверить базу данных пакетов на целостность.
Еще рассмотрим дополнительные опции, которые могут вам понадобиться когда будет выполняться установка rpm CentOS:
- -y — всегда отвечать на вопросы утилиты утвердительно;
- -q — минимальный вывод;
- -v — максимальный вывод;
- -С — работать из кэша;
- -x — игнорировать пакет.
Теперь вы знаете все основные возможности утилиты, рассмотрим некоторые примеры работы с ней.
Установка пакетов в CentOS 7
Перед тем как переходить к установке пакетов CentOS нужно обновить список репозиториев и систему до самой последней версии. Для этого существует команда:
sudo yum update
Установка пакета CentOS
Чтобы установить пакет, который есть в официальных репозиториях вам достаточно использовать команду install. Просто наберите эту команду и имя пакета, например, для firefox:
sudo yum install thunderbird
Во время установки вам придется подтвердить, что вы хотите установить именно эту программу нажав клавишу y. Чтобы этого избежать используйте опцию -y:
sudo yum -y install thunderbird
Чтобы посмотреть информацию об установленном пакете используйте команду info:
sudo yum info thunderbird
Для удаления пакета используйте команду remove:
sudo yum remove thunderbird
Поиск пакетов CentOS
Мы знаем точные названия далеко не всех пакетов. Но yum поддерживает возможность поиска, которая поможет вам понять какой установить пакет CentOS 7. Существует две команды для поиска. Первая — это search — позволяет найти пакет по названию:
sudo yum search mysql
Вторая позволяет найти нужный пакет по команде, которая вам нужна, в некоторых случаях это бывает очень удобно:
sudo yum provides lspci
Теперь вы знаете какой пакет нужен и установка пакетов rpm CentOS 7 теперь может быть выполнена очень быстро и вам не нужно открывать множество форумов для поиска информации.
Группы пакетов CentOS
Группы пакетов, это тоже достаточно удобный инструмент. С помощью него вы можете не устанавливать пакеты по одному, а установить сразу целую группу. Сначала посмотрите список доступных групп:
sudo yum group list
Дальше вы можете посмотреть список файлов в каждой выбранной группе:
sudo yum group info «Стандартный веб-сервер»
Затем. чтобы установить группу пакетов наберите:
sudo yum group install «Стандартный веб-сервер»
Точно так же вы можете обновить группу пакетов, чтобы не обновлять всю систему:
sudo yum group update «Стандартный веб-сервер»
sudo yum group remove «Стандартный веб-сервер»
Репозитории пакетов CentOS
В официальных репозиториях есть далеко не все нужные пакеты. Если серверные программы там можно найти без труда, то с программами для рабочего стола, теми же кодеками, возникнут проблемы. Их нужно устанавливать из сторонних репозиториев.
Репозитории в CentOS добавляются не через конфигурационный файл, они устанавливаются путем загрузки и установки rpm файла репозитория. Например, один из самых часто используемых сторонних репозиториев — это EPEL. Его установщик есть в официальных репозиториях, поэтому для подключения достаточно выполнить:
sudo yum install epel-release
Но такая ситуация не со всеми репозиториями. Многие из них хранят файлы установки у себя. Например, репозиторий с различным мультимедийным программным обеспечением nux устанавливается по-другому. Сначала нужно скачать файл репозитория по ссылке. Качайте обязательно последнюю версию иначе ничего работать не будет.
Например, на данный момент самая новая
Затем установите загруженный пакет с помощью yum:
sudo yum install nux-dextop-release-0-5.el7.nux.noarch.rpm
Затем обновите список репозиториев и можете устанавливать пакеты:
sudo yum update
Далее можете устанавливать пакеты, например, vlc:
sudo yum install vlc
Ну и смотрим список репозиториев:
sudo yum repolist
Здесь отображаются все доступные репозитории. Для удаления репозитория будет достаточно удалить его пакет.
Установка программ CentOS в GUI
Если вы не любите пользоваться терминалом, то установка программ CentOS 7 может быть выполнена и через графический интерфейс. Но здесь возможностей намного меньше чем в терминале. Используйте утилиту «Программы», которая расположена в главном меню:
Здесь вы можете выбрать нужную категорию программ или ввести имя пакета в поиске:
Затем останется нажать кнопку «Установить пакет». Но тут не поддерживается работа с репозиториями.
Выводы
В этой статье мы рассмотрели как выполняется установка пакетов Centos 7. Конечно, здесь нет такого большого количества пакетов, как в той же самой Ubuntu или OpenSUSE, но для сервера их вполне хватает, а для рабочего стола всегда можно собрать из исходников то, что очень нужно. Надеюсь информация была полезной для вас.
20 Linux YUM (Yellowdog Updater, Modified) Commands for Package Management
by Ravi Saive | Published: August 11, 2012 | Last Updated: September 13, 2012
In this article, we will learn how to install, update, remove, find packages, manage packages and repositories on Linux systems using YUM (Yellowdog Updater Modified) tool developed by RedHat. The example commands shown in this article are practically tested on our CentOS 6.3 server, you can use these material for study purpose, certifications or just to explore ways to install new packages and keep your system up-to-date. The basic requirement of this article is, you must have a basic understanding of commands and a working Linux operating system, where you can explore and practice all the commands listed below.
20 Linux Yum Commands
What is YUM?
YUM (Yellowdog Updater Modified) is an open source command-line as well as graphical based package management tool for RPM (RedHat Package Manager) based Linux systems. It allows users and system administrator to easily install, update, remove or search software packages on a systems. It was developed and released by Seth Vidal under GPL (General Public License) as an open source, means anyone can allowed to download and access the code to fix bugs and develop customized packages. YUM uses numerous third party repositories to install packages automatically by resolving their dependencies issues.
1. Install a Package with YUM
To install a package called Firefox 14, just run the below command it will automatically find and install all required dependencies for Firefox.
The above command will ask confirmation before installing any package on your system. If you want to install packages automatically without asking any confirmation, use option -y as shown in below example.
2. Removing a Package with YUM
To remove a package completely with their all dependencies, just run the following command as shown below.
Same way the above command will ask confirmation before removing a package. To disable confirmation prompt just add option -y as shown in below.
3. Updating a Package using YUM
Let’s say you have outdated version of MySQL package and you want to update it to the latest stable version. Just run the following command it will automatically resolves all dependencies issues and install them.
4. List a Package using YUM
Use the list function to search for the specific package with name. For example to search for a package called openssh, use the command.
To make your search more accurate, define package name with their version, in case you know. For example to search for a specific version openssh-4.3p2 of the package, use the command.
5. Search for a Package using YUM
If you don’t remember the exact name of the package, then use search function to search all the available packages to match the name of the package you specified. For example, to search all the packages that matches the word .
6. Get Information of a Package using YUM
Say you would like to know information of a package before installing it. To get information of a package just issue the below command.
7. List all Available Packages using YUM
To list all the available packages in the Yum database, use the below command.
8. List all Installed Packages using YUM
To list all the installed packages on a system, just issue below command, it will display all the installed packages.
9. Yum Provides Function
Yum provides function is used to find which package a specific file belongs to. For example, if you would like to know the name of the package that has the /etc/httpd/conf/httpd.conf.
10. Check for Available Updates using Yum
To find how many of installed packages on your system have updates available, to check use the following command.
11. Update System using Yum
To keep your system up-to-date with all security and binary package updates, run the following command. It will install all latest patches and security updates to your system.
12. List all available Group Packages
In Linux, number of packages are bundled to particular group. Instead of installing individual packages with yum, you can install particular group that will install all the related packages that belongs to the group. For example to list all the available groups, just issue following command.
13. Install a Group Packages
To install a particular package group, we use option as groupinstall. Fore example, to install “MySQL Database“, just execute the below command.
14. Update a Group Packages
To update any existing installed group packages, just run the following command as shown below.
15. Remove a Group Packages
To delete or remove any existing installed group from the system, just use below command.
16. List Enabled Yum Repositories
To list all enabled Yum repositories in your system, use following option.
16. List all Enabled and Disabled Yum Repositories
The following command will display all enabled and disabled yum repositories on the system.
17. Install a Package from Specific Repository
To install a particular package from a specific enabled or disabled repository, you must use –enablerepo option in your yum command. For example to Install PhpMyAdmin 3.5.2 package, just execute the command.
18. Interactive Yum Shell
Yum utility provides a custom shell where you can execute multiple commands.
19. Clean Yum Cache
By default yum keeps all the repository enabled package data in /var/cache/yum/ with each sub-directory, to clean all cached files from enabled repository, you need to run the following command regularly to clean up all the cache and make sure that there is nothing unnecessary space is using. We don’t want to give the output of the below command, because we like to keep cached data as it is.
20. View History of Yum
To view all the past transactions of yum command, just use the following command.
We have tried to cover all the basic to advance yum commands with their examples. If anything related to yum commands may have missed out. Please update us through our comment box. So, we keep updating the same based on feedback’s received.