Reputation: 832
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.
php72
on AWS EC2?yum
repo to connect to?Upvotes: 9
Views: 13549
Reputation: 508
As @Typel says in a comment on the other answer - if you're using Amazon Linux 2 AMI then
sudo amazon-linux-extras install -y php7.2
Beats installing multiple external repos and has most of th basics, including mariadb and vim (everything I need to feel happy!).
See the list: sudo amazon-linux-extras list
Upvotes: 6
Reputation: 6663
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 ...
Upvotes: 6