Introduction
YUM is the package manager for all operating systems supported by cPanel. This article covers how to use YUM to manage to packages installed on your server.
Searching for a package by name or description
You can search for a package with the command below, where TEXT is replaced with what you're searching for.
yum search TEXT
For example, if you'd like to search for the Intl PHP extension.
[root@cent7-90 ~]# yum search intl
Loaded plugins: fastestmirror, universal-hooks
Loading mirror speeds from cached hostfile
* EA4: 184.94.196.93
* cpanel-addons-production-feed: 184.94.196.93
* cpanel-plugins: 184.94.196.93
========================================================================================================================== N/S matched: intl ==========================================================================================================================
ea-php54-php-intl.x86_64 : Internationalization extension for PHP applications
ea-php55-php-intl.x86_64 : Internationalization extension for PHP applications
ea-php56-php-intl.x86_64 : Internationalization extension for PHP applications
ea-php70-php-intl.x86_64 : Internationalization extension for PHP applications
ea-php71-php-intl.x86_64 : Internationalization extension for PHP applications
ea-php72-php-intl.x86_64 : Internationalization extension for PHP applications
ea-php73-php-intl.x86_64 : Internationalization extension for PHP applications
ea-php74-php-intl.x86_64 : Internationalization extension for PHP applications
intltool.noarch : Utility for internationalizing various kinds of data files
perl-libintl.x86_64 : Internationalization library for Perl, compatible with gettext
Name and summary matches only, use "search all" for everything.
Searching for a package by contents
Sometimes you may not know much about a package except that it contains a specific file. In this case, you can use the command below, where /PATH/TO/FILE is replaced with the actual path to the file.
yum provides /PATH/TO/FILE
For example, if we want to search for the package containing /opt/cpanel/ea-php74/root/usr/lib64/php/modules/intl.so.
# yum provides /opt/cpanel/ea-php74/root/usr/lib64/php/modules/intl.so
[root@cent7-90 ~]# yum provides /opt/cpanel/ea-php74/root/usr/lib64/php/modules/intl.so
Loaded plugins: fastestmirror, universal-hooks
Loading mirror speeds from cached hostfile
* EA4: 184.94.196.93
* cpanel-addons-production-feed: 184.94.196.93
* cpanel-plugins: 184.94.196.93
ea-php74-php-intl-7.4.9-1.1.7.cpanel.x86_64 : Internationalization extension for PHP applications
Repo : EA4
Matched from:
Filename : /opt/cpanel/ea-php74/root/usr/lib64/php/modules/intl.so
...
Installing a package
You can install a package using the command below where PACKAGE is the package name.
yum install PACKAGE
For example, if you want to install the PHP 7.4 Intl extension we just found.
yum install ea-php74-php-intl
Removing a package
You can remove a package with the command below, where PACKAGE is the package name.
yum remove PACKAGE
For example, removing the PHP 7.4 Intl extension we just installed.
yum remove ea-php74-php-intl
Always review the packages that will be removed as the package you are attempting to remove may be a dependency of other packages. Removing needed packages could potentially result in irreparable damage to the server.
Comments
0 comments
Article is closed for comments.