To prevent specific packages, such as cloudlinux-release and certain alt-php versions, from being updated via YUM, you need to modify the /etc/yum.conf file. This ensures that these packages remain untouched during system updates.
Steps to Implement
-
Edit the YUM Configuration File
Open/etc/yum.confusing a text editor:nano /etc/yum.conf -
Modify the
excludeLine
Locate theexcludedirective in the[main]section and append the packages:[main] exclude=bind-chroot dovecot* exim* filesystem nsd* p0f php* proftpd* pure-ftpd* cloudlinux-release alt-php5[1-5]* ea-apache24-mod_lsapi* tolerant=1Ensure all existing configurations remain intact.
-
Save the Changes
After editing, save and close the file. -
Refresh the YUM Cache
Run the following commands to apply the changes:yum clean all yum makecache
This configuration ensures that cloudlinux-release and the specified alt-php versions will not be updated when running yum update. Regularly review the configuration to align with system requirements and security policies.
