How to install LAMP (Linux Apache MySQL PHP) on Xubuntu 14.04

This tutorial is going to show you How to install LAMP (Linux Apache MySQL PHP) on Xubuntu 14.04. LAMP stands for Linux Apache MySQL and PHP. With LAMP we can turn our Xubuntu 14.04 into a powerful web server with PHP and MySQL support. Its very easy to install LAMP on Xubuntu 14.04. With a single command we can get this LAMP and all dependencies installed.

To install LAMP (Linux Apache MySQL PHP) on Xubuntu 14.04, open Terminal and type this command

[codesyntax lang=”bash” lines=”no”]


Dont forget the ^ at the end of the command above.

[codesyntax lang=”bash” lines=”no”]


Type Y and press Enter to confirm the installation.

During installation, you will be asked for MySQL root password. Once finished, start the Apache web server

[codesyntax lang=”bash”]


Now check if Apache was installed correctly. Open web browser and type http://localhost. You should see the following page displayed on your web browser.

install lamp server on xubuntu 14.04 1

Next check if PHP5 was correctly installed:

[codesyntax lang=”bash”]


Now paste the following lines to the info.php

[codesyntax lang=”php” lines=”normal”]


Next, open web browser again and type: http://localhost/ You should see something like this

install lamp server on xubuntu 14.04 2

Now all done. LAMP Server is installed on Xubuntu 14.04.



  1. Another better way is to install each package seperately (to be sure to get in the future the update of each packet at the right time) with the command:
    sudo apt-get install apache2 php5 mysql-server libapache2-mod-php5 php5-mysql

    And width PhpMyAdmin add: phpmyadmin

  2. Not Found

    The requested URL / was not found on this server.
    Apache/2.4.7 (Ubuntu) Server at localhost Port 80

    it is my error..
    what i can do ?

  3. Am using Deepin linux,
    after installation i tried sudo nano /var/www/html/info.php, then i got
    sudo: nano/var/www/html/info.php: command not found

    how to correct this

    • sudo nano /var/www/html/info.php
      please make sure you put space after sudo and after nano. This command will create a blank file called info.php

Leave a Reply

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