YUM (Yellowdog Updater Modified) is an open source default package management system for several Linux flavors like RHEL (Red Hat Enterprise Linux), CentOS (Community Enterprise Operating System)and Fedora. The YUM utility is used install, upgrade, remove rpm based packages from the distribution repositories in systems.
But sometime we don’t want to do update certain packages such as Apache Server (HTTP), MySQL, PHP and other major applications, because if such updates may harm currently running web application on server or you may stop updates till the application gets patched with new updates.
In this article we will show you how we can exclude (disable) certain package updates using YUMtool. We can exclude or disable certain package updates from the any third party repositories. The exclude syntax would be as follow.
The above syntax will exclude “package“, “package1” and list of “package” updates or installs. Each keyword should be separated with space for exclusion of packages.
How to Exclude Packages in YUM
To exclude (disable) specific package updates, Open file called /etc/yum.conf with your choice of editor.
Add the following line at the bottom of the file with exclude keyword as shown below.
In the above example, the line exclude will disable updates for “httpd” “php” and “mysql” packages. Let’s try installing or updating one of them using YUM command as shown below.
No comments:
Post a Comment