Apache and PHP
Install Apache and PHP
yum update -y
yum install httpd php php-cli php-mysql php-devel php-xml -y
Start Apache and make sure that it starts again on boot
chkconfig --level 235 httpd on
service httpd start
IPTables
Open Port 80 on IPTables
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
service iptables save
Display PHPInfo
Create PHP Info File in the Apache directory so that it can be displayed as a web page, and give file appropriate permissions
vim /var/www/html/index.php
Insert the following text and save the file.
<?php
phpinfo( );
?>
Permissions
Give it file permissions so that it can be read by Apache
chmod 755 /var/www/html/index.php
Test
Navigate to the server’s IP address, using your browser. You should now be able to see all of your PHP info.