Approved: Fortect
It looks like some of our users ran into an error while disabling Yum core updates. There are many factors that can cause this problem. Let’s discuss this below.
Environment
- Red Hat Enterprise Linux (RHEL) 5
- Red Hat Enterprise Linux (RHEL) 6
- Red Hat Enterprise Linux (RHEL) 7
- Red Hat Satellite
- Red Hat Network
Problem
- How can I exclude the kernel and other packages from upgrading on Red Hat Enterprise Linux while upgrading directly from yum?
- How to use the exclusion function with yum?
- How do I prevent a package from being updated when updating the system from a secondary server?
- How to exclude only 32-bit packages, also called 64-bit packages?
Resolution
-
The
up2date
direction in Red Hat Enterprise Linux 7 excludes kernel updates by default. The standard inyum
Red Hat Enterprise Linux 5 is kernel updates. -
To skip installing or updating the kernel or other packages while browsing, the
yum
update utility on Red Hat Enterprise Linux 5, 6, and 7 uses the following features: -
Workaround from the command line:
# amazing update --exclude = PACKAGENAME
For example, to exclude all packages related to the kernel:
# Yum update --exclude = kernel *
To not include gcc
and php
package names:
# delightful update --exclude = gcc, php
To prevent a specific package from being updated, let’s just edit the / etc / yum. conf to use “exclude” investments.
Exclude Gcc * and PHP * packages:
# amazing update --exclude = gcc * --exclude = php *
- To make permanent improvements, edit the
/etc/yum.conf
file and get the following results:
[principal]cachedir = / var / cache / yum / $ basearch / $ releaseverKeepcache = 0Debug level = 2log file = / var / log / yum.logException = Core * Redhat Version * <==== If
Note. You need to exclude many different packages and then separate them all with one space or comma. Do not add different exclude =
lines to the configuration file just because yum
only counts the last exclude
entry.
To not include 32-bit packages, edit the /etc/yum.conf
file.
The Yum package administrator allows kernel updates. However, CentOS never offers the latest kernel in the official repository. To update the kernel on your CentOS, you need to install a large third party repository called ElRepo. ElRepo offers an extended kernel version available at kernel.org.
exclude = * .i? 86 * .i686
This solution is part of the Red Hat Fast Track Publishing program and includes an extensive library of solutions that Red Hat developers have developed to help our customers. To provide you with the knowledge you need as it comes in, these articles can be easily presented in their raw form and in their raw form.
Q: Make a great list of exceptions so that anyone running yum update will definitely not download all the kernel patches?
# tasty update --exclude = PACKAGENAME.# yum update --exclude = core *[main] cachedir = / var / cache / yum / $ basearch / $ releasever keepcache = 0 debuglevel = 2 logfile = / var / log / yum.log exclude = kernel * redhat-release * <====exclude = * .i? eighty six * .i686.
Answer:
This can be caused in two ways:
1.yum config filefor yum.conf (persistent)
2. Use command line parameters
Use Yum.conf
2. This should be on all clients in this "[main]" section of yum in.conf.
3. Make sure you don't see all the kernel packages in the packages being installed when customers run the yum update command:
From The Command Line
This is temporary and we need to generate an exception list on the command line.
# boy yum.confexcludeA list of packages to exclude or updates to install. This should be a separate list from the environment. Placeholders for shell globes (such as * and?) Are allowed.
Approved: Fortect
Fortect is the world's most popular and effective PC repair tool. It is trusted by millions of people to keep their systems running fast, smooth, and error-free. With its simple user interface and powerful scanning engine, Fortect quickly finds and fixes a broad range of Windows problems - from system instability and security issues to memory management and performance bottlenecks.
# vi /etc/yum.conf[above all]cachedir = / var / cache / yum / $ basearch / $ releaseverKeepcache = 0Debug level = 2log file = / var / log / yum.logexact search = 1obsolete = 1gpgcheck = 1Plugins = 1install_limit = 3# Exclude PUT core updatesexclude = core *# YOUR REST IS HERE OR In separate files named file.repo# via /etc/yum.repos.d
# yum --exclude = core * updateSpeed up your computer's performance now with this simple download.