Install apache php and mysql on ubuntu

It’s just matter of executing few set of commands on ubuntu. Let’s learn how to install apache php and mysql on ubuntu.

Step 1 : Install Apache2
Execute following command on terminal

    sudo apt-get install apache2

Step 2 : Open up any web browser and add “http://localhost”.
It will show you default apache index page.

Step 3 : Now lets install PHP with apache

sudo apt-get install php5 libapache2-mod-php5

Step 4 : Restart apache using following command.

    // restart apache
   sudo /etc/init.d/apache2 restart

Step 5 : Now create test php file to check php info

   phpinfo();
Share this nice post:

2 thoughts on “Install apache php and mysql on ubuntu

Leave a Reply

Your email address will not be published. Required fields are marked *