Install PHP & Apache on Centos and Bionic

I don't do this very often but when it occurs i need to look up the steps as well because it isn't my daily driver.

On Ubuntu Bionic 18.04.x whatever you need the following steps to get php working out of the box (might not apply for future versions)

    1  apt-get update -y
    2  apt-get install apache2 -y
    3  apt-get install php
    4  systemctl enable apache2 --now
    5  touch /var/www/html/infophp.php
    
    echo "<?php\nphpinfo();\n?>" >> /var/www/html/infophp.php

The almost same applies to centos7 , might not apply to the extend to the upcoming centos 8.

1 yum install epel-release -y
2 yum install centos-release-scl -y
3 yum update -y
4 yum install httpd php -y
5 touch /var/www/html/infophp.php
6 echo "<?php\nphpinfo();\n?>" >> /var/www/html/infophp.php
7 systemctl enable httpd --now

that's it ... not that complicated at all.