, , ,

How to Install PHP 7.3 on AWS Ec2 Linux

Getting you Ec2 Instance set-up correctly from the outset saves you hours of keyboard smashing!

PHP has been evolving rapidly lately, the current iteration is 7.4 and version 8 is not too far away.

One of the challenges with these welcomed updates, is trying to keep up with them!

How to Install PHP 7.3 on your AWS Ec2 Instance

Currently, the latest available version of PHP on AWS Linux image is 7.3.17 (May 2020)

Installation can be quick and painless with these steps:

 

Access your Ec2 via your favourite tool, such as Putty.

$~ sudo su

$~ yum update

$~ yum install -y php73 php73-devel php73-mysql php73-pdo php73-mbstring

$~ yum install -y php73-gd php73-xml php73-xmlrpc php73-mcrypt php-pear

How to Install Apache 2.4 web-Server on your Ec2 Instance

Follow-up your PHP installation by installing Apache to get your web server up & running

$~ yum install -y httpd24 httpd24-tools mod24_ssl

$~ chkconfig httpd on

$~ service httpd start

How to Install SQL with PDO Support on your Ec2 Instance

Follow-up your PHP & Apache installation by installing SQL with PDO support

$~ php73-mysqlnd

$~ yum install -y mysql57-server php73-mysqlnd

Leave a reply

Your email address will not be published. Required fields are marked *