User Tools

Site Tools


linux:redhat_yum

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
linux:redhat_yum [2021/01/01 21:25]
127.0.0.1 external edit
linux:redhat_yum [2024/09/26 17:34] (current)
manu [Yum disable RedHat subscription]
Line 1: Line 1:
 ===== What is YUM? ===== ===== What is YUM? =====
 +
 +On latest verions (8) DNF replace 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. 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.
 +
 +==== Exclude kernel updates ====
 +
 +<cli prompt='#'>​
 +# vi /​etc/​dnf/​dnf.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=5
 +bugtracker_url=http://​bugs.centos.org/​set_project.php?​project_id=16&​ref=http://​bugs.centos.org/​bug_report_page.php?​category=yum
 +distroverpkg=centos-release
 +
 +exclude=kernel* redhat-release* kmod-kvdo ​
 +</​cli>​
 +
 +Or using command line
 +<cli prompt='#'>​
 +# dnf --exclude=kernel\* --exclude=redhat-release\* update
 +</​cli>​
  
 ==== Install a Package with YUM ==== ==== Install a Package with YUM ====
Line 45: Line 72:
 # yum -y install firefox # yum -y install firefox
 </​cli>​ </​cli>​
 +
 +When you have conflicts, you can add options
 +<cli prompt='#'>​
 +# yum update –-allowerasing
 +</​cli>​
 +
 +
 +==== Install a Package from a local folder ====
 +
 +<cli prompt='#'>​
 +# yum --disablerepo=* localinstall *.rpm
 +# yum --disablerepo=* localinstall foo.rpm bar.rpm baz.rpm
 +</​cli>​
 +
  
 ==== Removing a Package with YUM ==== ==== Removing a Package with YUM ====
Line 624: Line 665:
 You can disable all plug-ins by changing this line to **plugins=0** You can disable all plug-ins by changing this line to **plugins=0**
  
- +===== Work with Redhat package modules ===== 
 + 
 +List available package 
 +<cli prompt='#'>​ 
 +[root@rheltpl9 ~]# yum info postgresql-server.ppc64le 
 +Updating Subscription Management repositories. 
 +Available Packages 
 +Name         : postgresql-server 
 +Version ​     : 13.16 
 +... 
 +</​cli>​ 
 + 
 +List available module package 
 +<cli prompt='#'>​  
 +[root@rheltpl9 ~]# yum module list  postgresql 
 +Updating Subscription Management repositories. 
 +... 
 +Name              Stream ​        ​Profiles ​                     Summary 
 +postgresql ​       15             ​client,​ server [d]            PostgreSQL server and client module 
 +postgresql ​       16             ​client,​ server [d]            PostgreSQL server and client module 
 + 
 +Hint: [d]efault, [e]nabled, [x]disabled,​ [i]nstalled 
 +</​cli>​ 
 + 
 +Enable Postgres version 16 
 +<cli prompt='#'>​  
 +[root@rheltpl9 ~]# yum module reset postgresql 
 +Updating Subscription Management repositories. 
 + 
 +[root@rheltpl9 ~]# yum module enable postgresql:​16 
 +Updating Subscription Management repositories. 
 +... 
 +Dependencies resolved. 
 +============================================================================================================= 
 + ​Package ​                                           Architecture ​                                     Version ​                                           Repository ​                                         Size 
 +============================================================================================================= 
 +Enabling module streams: 
 + ​postgresql ​                                                                                          16 
 + 
 +Transaction Summary 
 +============================================================================================================ 
 + 
 +Is this ok [y/N]: y 
 +Complete! 
 + 
 +[root@rheltpl9 ~]# yum module list  postgresql 
 +Updating Subscription Management repositories. 
 +... 
 +Name             ​Stream ​           Profiles ​                               Summary 
 +postgresql ​      ​15 ​               client, server [d]                      PostgreSQL server and client module 
 +postgresql ​      16 [e]            client, server [d]                      PostgreSQL server and client module 
 + 
 +Hint: [d]efault, [e]nabled, [x]disabled,​ [i]nstalled 
 + 
 +[root@rheltpl9 ~]# yum info postgresql-server.ppc64le 
 +Updating Subscription Management repositories. 
 +... 
 +Available Packages 
 +Name         : postgresql-server 
 +Version ​     : 16.4 
 +</​cli>​ 
 + 
linux/redhat_yum.1609532709.txt.gz · Last modified: 2021/01/01 21:25 by 127.0.0.1