Cyberithub

How to Properly Search PHP Modules Using YUM tool in Linux(RHEL/CentOS 7/8)

In this article, i will show you how to properly search PHP modules using yum tool in Linux(RHEL/CentOS 7/8). Sometimes it might happen that you don’t know the name of PHP module that you want to install through yum repository or you are not aware of all the PHP modules available on yum repository. In those cases you can use yum search command to check all the available modules and then install whichever is required. I have shown one such example in below article.

How to Search PHP Modules Using YUM tool in Linux

How to Search PHP Modules Using YUM Tool in Linux

Also Read: Solved: FATAL: Authentication Helper Program /usr/lib/squid/basic_ncsa_auth: (2) No Such File or Directory

If you want to search yum repository for all the available PHP modules then you can use yum search php- command as shown below. This command will list out all the available PHP modules along with its description. Check more on YUM Man Page.

[root@localhost ~]# yum search php-
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.piconets.webwerks.in
* extras: mirrors.piconets.webwerks.in
* updates: mirrors.piconets.webwerks.in
============================== N/S matched: php- ===============================
emacs-php-mode.noarch : Major GNU Emacs mode for editing PHP code
php-bcmath.x86_64 : A module for PHP applications for using the bcmath library
php-cli.x86_64 : Command-line interface for PHP
php-common.x86_64 : Common files for PHP
php-dba.x86_64 : A database abstraction layer module for PHP applications
php-devel.x86_64 : Files needed for building PHP extensions
php-embedded.x86_64 : PHP library for embedding in applications
php-enchant.x86_64 : Enchant spelling extension for PHP applications
php-fpm.x86_64 : PHP FastCGI Process Manager
php-gd.x86_64 : A module for PHP applications for using the gd graphics library
php-intl.x86_64 : Internationalization extension for PHP applications
php-ldap.x86_64 : A module for PHP applications that use LDAP
php-mbstring.x86_64 : A module for PHP applications which need multi-byte string
: handling
php-mysql.x86_64 : A module for PHP applications that use MySQL databases
php-mysqlnd.x86_64 : A module for PHP applications that use MySQL databases
php-odbc.x86_64 : A module for PHP applications that use ODBC databases
php-pdo.x86_64 : A database access abstraction module for PHP applications
php-pear.noarch : PHP Extension and Application Repository framework
php-pecl-memcache.x86_64 : Extension to work with the Memcached caching daemon
php-pgsql.x86_64 : A PostgreSQL database module for PHP
php-process.x86_64 : Modules for PHP script using system process interfaces
php-pspell.x86_64 : A module for PHP applications for using pspell interfaces
php-recode.x86_64 : A module for PHP applications for using the recode library
php-snmp.x86_64 : A module for PHP applications that query SNMP-managed devices
php-soap.x86_64 : A module for PHP applications that use the SOAP protocol
php-xml.x86_64 : A module for PHP applications which use XML
php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC protocol

Name and summary matches only, use "search all" for everything.

Once you have modules listed you can now install whichever module is needed. For example if you want to install php-mysql package then you need to use yum install php-mysql -y command to install the package as shown below. Similarly, you can install other PHP modules using yum install <php-xxx> -y command. This is the simplest and the best way to install PHP modules using yum tool in Linux.

[root@localhost ~]# yum install php-mysql -y
Resolving Dependencies
--> Running transaction check
---> Package php-mysql.x86_64 0:5.4.16-48.el7 will be installed
--> Processing Dependency: php-pdo(x86-64) = 5.4.16-48.el7 for package: php-mysql-5.4.16-48.el7.x86_64
--> Running transaction check
---> Package php-pdo.x86_64 0:5.4.16-48.el7 will be installed
--> Processing Dependency: php-common(x86-64) = 5.4.16-48.el7 for package: php-pdo-5.4.16-48.el7.x86_64
--> Running transaction check
---> Package php-common.x86_64 0:5.4.16-48.el7 will be installed
--> Processing Dependency: libzip.so.2()(64bit) for package: php-common-5.4.16-48.el7.x86_64
--> Running transaction check
---> Package libzip.x86_64 0:0.10.1-8.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================================================
Installing:
php-mysql x86_64 5.4.16-48.el7 base 102 k
Installing for dependencies:
libzip x86_64 0.10.1-8.el7 base 48 k
php-common x86_64 5.4.16-48.el7 base 565 k
php-pdo x86_64 5.4.16-48.el7 base 99 k

Transaction Summary
========================================================================================================================================================================
Install 1 Package (+3 Dependent packages)

Total download size: 815 k
Installed size: 4.3 M
Downloading packages:
(1/4): libzip-0.10.1-8.el7.x86_64.rpm | 48 kB 00:00:05
(2/4): php-common-5.4.16-48.el7.x86_64.rpm | 565 kB 00:00:05
(3/4): php-pdo-5.4.16-48.el7.x86_64.rpm | 99 kB 00:00:00
(4/4): php-mysql-5.4.16-48.el7.x86_64.rpm | 102 kB 00:00:00
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 123 kB/s | 815 kB 00:00:06
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : libzip-0.10.1-8.el7.x86_64 1/4
Installing : php-common-5.4.16-48.el7.x86_64 2/4
Installing : php-pdo-5.4.16-48.el7.x86_64 3/4
Installing : php-mysql-5.4.16-48.el7.x86_64 4/4
Verifying : php-pdo-5.4.16-48.el7.x86_64 1/4
Verifying : php-mysql-5.4.16-48.el7.x86_64 2/4
Verifying : libzip-0.10.1-8.el7.x86_64 3/4
Verifying : php-common-5.4.16-48.el7.x86_64 4/4

Installed:
php-mysql.x86_64 0:5.4.16-48.el7

Dependency Installed:
libzip.x86_64 0:0.10.1-8.el7 php-common.x86_64 0:5.4.16-48.el7 php-pdo.x86_64 0:5.4.16-48.el7

Complete!

 

 

 

 

 

Popular Recommendations:-

How to Install and Configure Squid Proxy Server on RHEL/CentOS 7/8

5 Best Ways to Become root user or Superuser in Linux (RHEL/CentOS/Ubuntu)

11 Best Python OS Module Examples on Linux

How to Install MariaDB 5.5 Server on RHEL/CentOS 7 Linux with Easy Steps

6 Simple Steps to Change/Reset MariaDB root password on RHEL/CentOS 7/8

Best Steps to Install Java on RHEL 8/CentOS 8

5 Examples to Turn Off SELinux Temporarily or Permanently on RHEL 8/CentOS 8

Best Explanation of Wrapper Classes in Java: Autoboxing and Unboxing with Examples

Leave a Comment