646.574.9521
Select Page

If you are using Fedora, CentOS, Red Hat or Scientific Linux I am going to show you the basic install of Apache2 and PHP using yum.

### Install Apache2.

To install Apache2 just enter the following command:
yum install httpd

### Install PHP

To install PHP just enter the following command:
yum install php

### Start up Apache2

The following command is going to setup Apache and set it up to start everytime your workstation or server books.
chkconfig –level 2345 httpd on; service httpd start

### Test Your Install

Now its time to test your install of Apache2 and PHP, To Do this we are going to make a small PHP file and run in from your brower.

The following command will create and index.php file with the PHPInfo command in it:
echo “<?php phpinfo(); ?>” > /var/www/html/index.php

Now launch your browser to http://127.0.0.1 or http://localhost if anything was done righ your output should look like the one below: