Skip to content
Advertisement

Upgrade to php 7 and apache 2.4 from php 5.3 and apache 2.2 in Amazon EC2

I have a legacy system in which Apache 2.2.34 (linux) is installed along with php 5.3.29 (CLI).

I just want to upgrade my apache to 2.4.x so that I will be able to use php 7.

I have tried searching for the same but majority of sites provide solution for CentOS or Ubuntu. I’m new to Linux so I’m a bit confused when applying the same on Amazon EC2 instance.

That would be really helpful if someone can provide me a step by step process to do the upgrade process. I just need to upgrade the server and I can do the configuration accordingly.

Advertisement

Answer

After some more googling, I have found the steps I have taken to upgrade. Hope that helps anyone looking for the same:

Login to your Linux instance and perform the regular system updates first

JavaScript

Stop the running web server

JavaScript

Create backup of the existing httpd by using command:

JavaScript

Remove any existing PHP packages

JavaScript

Remove old web server installs

JavaScript

Update yum package repository

JavaScript

Install Apache 2.4

JavaScript

Install PHP 7 packages

JavaScript

Install a new version of mod_ssl

JavaScript

I also needed to reconfigure /etc/httpd/conf/httpd.conf and /etc/httpd/conf.d/ssl.conf in order to enable SSL and pretty permalinks.

Finally all I needed to do is start my web server

JavaScript

That’s it.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement