How to Install PHP 7.4, 7.3 or 7.2 on AWS EC2 Instance in [ Easy Guide ]
Connect your Amazon Web Services (AWS) instance
Before installing PHP, you must update your privileges to root user (sudo su).
Let’s get PHP installed on the EC2 instance.
Installing the Apache Webserver
Check server running status
If you notice that the server is inactive, run the command below to start it.
Now copy and paste the EC2 Instance Public DNS, such as ec2-54-xxx-xxx-xxx.compute-1.amazonaws.com, into your browser and see if the apache server is up and running.
PHP 7.4 installation on server
Check for the inclusion of the amazon-linux-extras package:
Install the package that will configure the repository if the command does not return some output:
PHP 7.4, 7.3, 7.2 installations on Amazon AWS EC2
Let’s double-check that our AWS EC2 machine supports PHP 7.x:
We’ll enable the PHP 7.4 topic in this case, as we can see all PHP 7 topics.
Now, from the repository, install PHP packages.
Accept PHP 7 packages to be installed on AWS EC2.
Check the default PHP Version
To install PHP 7.2, disable 7.4 and 7.3 and enable 7.2.
Installing PHP 7.3 on Amazon AWS EC2, similar commands can be used.
PHP has now been installed in our EC2 instance. Please ask anything in the comment section if you have any questions.
How to Login & Use WakeID on iPhone
Are you tired of juggling multiple login credentials for various apps and services on your iPhone? Well, say goodbye to…