Skip to content

Instantly share code, notes, and snippets.

@diogoca
Created June 13, 2016 15:07
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save diogoca/98cf2ea05e91f3f6ee60235bcd38be1e to your computer and use it in GitHub Desktop.
Save diogoca/98cf2ea05e91f3f6ee60235bcd38be1e to your computer and use it in GitHub Desktop.
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
Copy link

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

@yalattas
Copy link

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