This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux:redhat_yum [2022/09/13 23:44] manu [Exclude kernel updates] |
linux:redhat_yum [2024/09/26 17:34] (current) manu [Yum disable RedHat subscription] |
||
---|---|---|---|
Line 7: | Line 7: | ||
==== Exclude kernel updates ==== | ==== Exclude kernel updates ==== | ||
- | <cli Prompt='#'> | + | <cli prompt='#'> |
# vi /etc/dnf/dnf.conf | # vi /etc/dnf/dnf.conf | ||
[main] | [main] | ||
Line 26: | Line 26: | ||
Or using command line | Or using command line | ||
- | <cli Prompt='>'> | + | <cli prompt='#'> |
# dnf --exclude=kernel\* --exclude=redhat-release\* update | # dnf --exclude=kernel\* --exclude=redhat-release\* update | ||
</cli> | </cli> | ||
Line 77: | Line 77: | ||
# yum update –-allowerasing | # yum update –-allowerasing | ||
</cli> | </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 656: | 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> | ||
+ |