We can install PHP5 and the Apache PHP5 module as follows:
yum -y install php
We must restart Apache afterwards:
systemctl restart httpd.service
The document root of the default web site is /var/www/html. We will now create a small PHP file (info.php) in that directory and call it in a browser. The file will display lots of useful details about our PHP installation, such as the installed PHP version.
< ?php phpinfo(); ?>