UNIX & GNU/Linux - LAMP - Installation

For a reason or for another, you need a server. You could install Apache, why not? But you want more! You want Apache2, PHP and MySQL in a bundle. For the same price we're going to add phpMyAdmin.

Let's see how to install LAMP and phpMyAdmin in this Ubuntu tutorial.

LAMP: Linux, Apache HTTP, MySQL, PHP

We have to download and install LAMP with the following command line in our terminal:

sudo apt-get install lamp-server^

Don't forget the "^".

You will be prompted to enter a password for MySQL.

Then the setup will be finished.

To try it open a browser and write the following URL: http://localhost/

You should see a beautiful "It works!".

LAMP is now installed.

phpMyAdmin

To use a database we could do it with a command line. But we like graphical user interface (GUI), so we are going to install phpMyAdmin.

For that type this line:

sudo apt-get install phpmyadmin

Then choose Apache2 when the program ask you which server you would like to use.

To be sure that Apache is linked with phpMyAdmin, let's open this file:

sudo gedit /etc/apache2/apache2.conf

And add the following lines at the end of the apache2.conf file:

# for phpMyAdmin
Include /etc/phpmyadmin/apache.conf

Let's restart Apache to activate phpMyAdmin:

sudo /etc/init.d/apache2 restart

Open a browser and enter this URL: http://localhost/phpmyadmin

The phpMyAdmin home page will be available. Write the username (certainly root) and the password set during installation process.

phpMyAdmin is ready to use.

Conclusion

You are now able to use a server to handle requests.
Beautiful work, you've made it! wink

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Refresh Type the characters you see in this picture. Type the characters you see in the picture; if you can't read them, submit the form and a new image will be generated. Not case sensitive.  Switch to audio verification.