redhat yum - ghdrako/doc_snipets GitHub Wiki
DNF is fully compatible with YUM and provides YUM-compatible command lines and APIs for extensions and plug-ins. *https://dnf.readthedocs.io/en/latest/command_ref.html
yum - YellowDog Updater Modified
Repositories
- Software publishers - {Redhat, CentOS}
- Third Party - {EPEL, RPMForge}
- your own
- authenticated
rm -rf /etc/sysconfig/rhn/systemid;yum clean all;subscription-manager clean;rm -rf /var/cache/yum/*;rm -rf /etc/yum.repos.d/*;yum -y localinstall http://s65capsule-mc.pkobp.pl/pub/katello-ca-consumer-latest.noarch.rpm; subscription-manager register --org="mc" --activationkey="actkey_gcp_rhel8_dev_free"
subscription-manager unregister
subscription-manager repos --list
yum --help
yum help
yum module list postgresql
yum list # list of package names from the repository
yum list available # list of all available packages
yum list installed # list of all installed packages
yum list installed httpd # is the specified package installed
yum list all # list of installed and available packages
yum list kernel # list of packages related to the kernel
yum info httpd # list of packages related to the kernel
yum deplist httpd # list of dependencies and required packages
yum provides '*bin/top' # find the package that contains the file
yum localinstal <paclkage>.rpm
yum check-update
yum upgrade
yum update package_name
Running yum update on a regular basis is an important part of system maintenance, as it helps keep your system secure and running smoothly.
yum update
To customize yum-cron, edit the /etc/sysconfig/yum-cron file
yum install yum-cron
chkconfig yum-cron on
service yum-cron start
service yum-cron status
yum list installed
yum list installed | grep <search_term>
yum remove <package>
yum remove <package_name> -y
yum remove <package_1> <package_2>
yum remove @"<group_name>" # or yum group remove "<group_name>"
yum search term…
yum search vim gvim emacs
yum list glob_expression
yum list abrt-addon\* abrt-plugin\*
yum list all
yum list installed
yum list installed "krb?-*"
yum list available
yum list available gstreamer\*plugin\*
yum grouplist
yum repolist
yum info package_name
yum info abrt
yumdb info package_name
yumdb info yum
repoquery --list package_name
yum install package_name
yum install package_name package_name
yum install sqlite.i686
yum install perl-Crypt-\*
yum install /usr/sbin/named
Example:
- Epel,
- Remi - Contains the latest versions of php and mysql. Requires Epel.
- Atrpms
- RPMForge
- ELRepo In order to enable these repositories, you need to edit one of the following files accordingly:
- /etc/yum.repos.d/epel.repo
- /etc/yum.repos.d/remi.repo
- /etc/yum.repos.d/atrpms.repo
- /etc/yum.repos.d/rpmforge.repo
The value of the ENABLED
parameter determines whether it is enabled (1) or disabled (0).
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
$ sudo yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
$ sudo yum-config-manager --disable remi-php54
$ sudo yum-config-manager --enable remi-php72
create a .repo file within /etc/yum.repo.d
$ nano /etc/yum.repo.d/mysql57-community.repo
[mysql57-community]
name=MySQL 5.7 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
$ yum-config-manager mysql57-community # verify that repo is configured properly