
This will populate a list, like the following, showing you all the current PHP modules installed. When logged into your server via SSH, type in the following command yum list installed *php*
Yum install php install#
You can, of course install multiple modules at once by using the following syntax: yum install package-one package-two package-threeĪ practical example of this would be: yum install php-cli php-fpm php php-punic

However, if I needed to install it, I would do so via the following command: yum install php-cli : executing PHP scripts, /usr/bin/PHP, and the CGI interface.Īs you can see, the test server that I am using already have this module installed. This would generate output similar to the following: Installed Packagesĭescription: The PHP-CLI package contains the command-line interface This tells you what packages are available, but what if you need to know what they do? In this instance, you can either put your "Google-fu" to work, or you can use the yum info command with the following syntax: yum infoįor example, let's pretend that you want to know more about the PHP-CLI module, you'd issue the following: yum info php-cli This will search for anything with "PHP-" in its name and display a list of matching packages on your monitor. But what if you're not sure what PHP modules you'd like to install? By using Yum, you can actually perform a search for different packages, in this case, PHP modules like so: yum, search php. The basic syntax to install modules is identical to installing other packages.
Yum install php software#
Like any other installable software in CentOS 7, you'll be installing PHP modules using the "yum" package manager. Once you have connected to your server via SSH, you can move on with the installation.

Yum install php how to#
If you're not familiar with how to do this, or you find yourself really enjoying our articles, please take a moment and read through the following: Connecting to Your Server via SSH. How To Install PHP Modules In CentOS 7īefore getting started, you'll need to log in to your server using SSH. However, if you have not done this yet, please look at our article: How to install PHP (CentOS 7). This article implies that you have already installed PHP on your CentOS 7 server.

The focus of this article is to explain how you can enable these modules in a CentOS 7 server so that you can take your PHP code to the next level. These modules are compiled libraries that can help you implement different methods to connect to other services without the need to "reinvent the wheel." By enabling these modules, your PHP code can become more versatile and adaptable, allowing you to interact with things such as MySQL seamlessly. PHP modules, or extensions, can greatly extend the core functionality of PHP.
