How to install PHP in CnetOS 7

Install php package
# yum install php
Create php test file to test php installed package
# vi /var/www/html/phpinfo.php
<?php
phpinfo();
?>
 
Access php page
http://192.168.35.150/phpinfo.php
or,
# php /var/www/html/phpinfo.php
or,
# links http://192.168.35.150/phpinfo.php
 

Share on Google Plus

About Penguin Technology

I am a passionate cloud and DevOps professional specializing in Linux and open-source solutions. Through this blog, I share my knowledge and experience with the community, offering tips and insights on cloud technologies and DevOps practices.
    Blogger Comment

1 comments: