Monday, June 29, 2020

Upgrading PHP7 in AWS EC2 Instance

We followed following steps to upgrade our PHP version from 5.6 to 7.3

Step 1   

First need to search which PHP 7 version is available as part of AWS package by using following command

sudo yum search  php7

 

This will list all available PHP7 packages. Choose one and Install

 

Step 2

 To Install PHP use following command. The following command will install PHP7.3

sudo yum install php73

      Step 3

 Install necessary extensions as follows

sudo yum install php73-opcache php73-mysqlnd php73-gd php73-bcmath php73-mbstring php73-pdo php73-soap

 

Step 4

If you are installing fresh PHP no need to do this step, if are using already previous version of PHP and trying to install, then this step is required.  Run the following command to select Proper php version

    alternatives --config php

No comments:

Post a Comment