Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to install Apache 2.4 and PHP 5.6 on Amazon Linux
# AWS EC2
# Remove Apache and PHP old version
# Install Apache 2.4, Mod_SSL and PHP 5.6
#
sudo service httpd stop
sudo yum erase httpd httpd-tools apr apr-util
sudo yum remove php-*
sudo yum install php56
sudo yum install php56-xml php56-xmlrpc php56-soap php56-gd php56-mbstring
sudo yum install php56-mysqlnd
sudo yum install mod24_ssl
sed -i -e 's/SSLMutex/Mutex/g' /etc/httpd/conf.d/ssl.conf
sudo service httpd start
sudo service httpd restart
#
# Update Apache, Mod_SSL and PHP
#
#sudo yum update php56
#sudo yum update mod24_ssl
#sudo yum update httpd httpd-tools
@mlauer30

This comment has been minimized.

Copy link

@mlauer30 mlauer30 commented Jun 27, 2019

This was great just what I needed to get composer to work correctly on my ec2 instance

@yalattas

This comment has been minimized.

Copy link

@yalattas yalattas commented Sep 30, 2020

Hi, I tried to install php5.6 but it failed
No package available. Could you pls help out?
I've old source code that I need to host urgently and unfortunately, source code won't work on php7.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment