PHP is a server-side scripting language for web based services. It is frequently used as general-purpose programming language as well. Install PHP on CentOS Minimal Server as.
# yum install php
After installing php, make sure to restart Apache service to render PHP in Web Browser.
# systemctl restart httpd.service
Next, verify PHP by creating following php script in the Apache document root directory.
# echo -e "<?php\nphpinfo();\n?>" > /var/www/html/phpinfo.php
Now view the PHP file, we just created (phpinfo.php) in Linux Command Line as below.
# php /var/www/html/phpinfo.php OR # links http://127.0.0.1/phpinfo.php