I want to install the latest PHP 7.0 on an AWS EC2 T2.Micro Instance. So far I have read that currently AWS do not support PHP 7. But hey.. This is just a virtual server in
I got this running on my instance. You need http2.2 for it to work with the webtatic repo. I had so many repos there were a bunch of different version incompatibilities. I didn't keep great notes but looking at my history I basically did this:
# Remove current php & apache
sudo service httpd stop
sudo yum remove httpd* php*
# Remove any third party repos that aren't relevant
sudo yum repolist
sudo yum remove remi-safe
# Install Standard Apache for Amazon AMI
sudo yum install httpd #specify http22 if you get a different version
# Download webtatic
mkdir -p /tmp/php7
cd /tmp/php7
wget https://mirror.webtatic.com/yum/el6/latest.rpm
# Install webtatic repo
sudo yum install latest.rpm
sudo vi /etc/yum.repos.d/webtatic.repo 'set repo enables
sudo yum clean all
# Install base php7
sudo yum install --enablerepo=webtatic php70w
php -v #Should say something like PHP 7.0.2 (cli) (built: Jan 9 2016 16:09:32) ( NTS )
sudo yum install php70w-opcache
sudo yum install php70w-xml
sudo yum install php70w-pdo
sudo yum install php70w-mysqlnd
sudo yum install php70w-gd
sudo yum install php70w-apcu
sudo yum install php70w-pecl-apcu
sudo yum install php70w-mbstring
sudo yum install php70w-imap
# Restart apache
sudo service httpd restart