Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

need help to install php 7.2 yum packages on aws ec2

I haven't seen any yum packages for php 7.2 on AWS EC2 and the release has been out over a month.

I have tried yum list | grep php7 and only able see php70 and php71 packages.

  • Has anyone installed php72 on AWS EC2?
  • Is there another yum repo to connect to?
  • Does AWS have a delivery scheduled?
like image 458
xeo Avatar asked Dec 30 '17 02:12

xeo


1 Answers

Although the @amzn-main repo doesn't have PHP 7.2 yet (as far as I know), you can use remi-php72. According to his release blog you can install the EPEL and Remi repositories via:

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
wget http://rpms.remirepo.net/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6.rpm
rpm -Uvh epel-release-latest-6.noarch.rpm

And then enable remi-php72 using yum-config-manager:

yum install yum-utils
yum-config-manager --enable remi-php72

After that, you can simply search and install php and all the needed extensions like normal:

sudo yum install --disablerepo="*" --enablerepo="remi,remi-php72" php php-fpm php-cli ... 
like image 131
Jeff Avatar answered Oct 21 '22 07:10

Jeff