How To Install PHP 7 Using YUM ON CentOS/RHEL 7?
Linux Commands Programming Tutorials

How To Install PHP 7 Using YUM ON CentOS/RHEL 7?

PHP 7 is one the latest version of PHP in IT industry and many modules/ libraries function has been deprecated in PHP7.0. This newer version of PHP 7.0.16 was made public on 11th May 2017 for CentOS/RHEL. PHP 7 got support for PEAR install and pecl has got deprecation so webtatic repository keeps deprecated libraries for support.

Here with the end of this article, we will learn how to install PHP7.0 on CentOS/RHEL 7.x using YUM from Webtatic repository.

Scenario: My Server IP is 192.168.1.188
OS CentOS: 7.0.1

Note: If you are a SUDO user then prefix every command with sudo, like #sudo ifconfig

Step1: Install Required repositories

To install PHP 7.0 we require Webtatic EL repository and EPEL repository will be required as a dependency for this repository installation:

Step 2: Install PHP With Webtatic

After first step 1, you can install PHP 7.0 with a simple command.

Step 3: Look For PHP Modules

As PHP7.0 is installed but your application may require a various module to process. PHP 7 also have a list for a wide variety of useful libraries and modules which you can add to your PHP. If you want to look for available PHP modules type in the following command:

Output Will be

Step 4: Install A module

Now as per your production and deployment requirement you can install any module listed. Here we are installing php70w-opcache and php70w-fpm as an example.

Well, Congratulations! You have successfully Installed PHP 7.0


Step 5: Check Your Installation

As you have successfully installed our custom PHP version, we need to verify its version and location of installation

Output Window will be like:

Also, check which version of PHP your shell is using:

Output Window:

Watch Video:

YouTube Link

You may also Like

  1. How To Install PHP using YUM
  2. How To Set Up LAMP Environment With Apache MySql And PHP: Part-1

Watch Video

Source [PHP Site]



Kapendra
Love to write technical stuff with personal experience as I am working as a Sr. Linux Admin. and every day is a learning day and Trust me being tech geek is really cool.
http://kapendra.com

Leave a Reply