How-to Tutorials

How to install PHP 5.6 on Amazon Linux 2

This method uses the “IUS” community repository at https://ius.io/ for CentOS 7. Make sure to run a yum update and install the epel-release repo to handle dependencies if you do not already have it installed.

sudo yum -y update
sudo yum install –y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Now you can install the IUS repository.

sudo yum install –y https://centos7.iuscommunity.org/ius-release.rpm

When you install packages they need to be referenced as php56u instead of php56. Below are some example packages available for install.

sudo yum install php56u php56u-opcache php56u-xml php56u-mcrypt\
php56u-gd php56u-devel php56u-mysql php56u-intl php56u-mbstring\
php56u-bcmath php56u-soap

You can refer to this link to find out more about the specific php version of the php56u package that IUS is offering.

Next Post

Previous Post

Leave a Reply

© 2020 linux bucket

All rights reserved