A few words of thanks would be greatly appreciated.

LAMP (Apache + MySQL + PHP) - quick install on Linux

LAMP is the combination of Linux, the Operating System, Apache, and the most robust Web Server, MySQL, the tiny but powerful database and a scripting Language in the form of PHP, Python or Perl. Installing LAMP is easily done by using the install command in the Linux console after providing the admin password for MySQL. After installation, the local host has to be opened in the browser and it will show accordingly. The association between Apache & PHP is essential. The next step is testing PHP in the same browser and it should pass the test. This is applicable for all variants of Linux like Redhat, Mandrake, Ubuntu, etc.


LAMP is the acronym for a free and open source software suite, usually used to define and run a dynamic web server infrastructure, software development and establish a software distribution package.
  • Linux: the OS
  • Apache: the Web server
  • MySQL: the database management system
  • And finally one of these scripting languages: Perl, PHP or Python

Quick Installation

sudo aptitude install apache2 php5 mysql-server php5-mysql libapache2-mod-php5 

Enter admin password required by mySQL.
sudo /etc/init.d/apache2 restart

Once the installation is complete, open http://localhost in your browser:

The root of your website is located in/var/www.

PHP test

Create the file /var/www/test.php containing:

<? phpinfo(); ?>

Open http://localhost/test.php in your browser.



A few words of thanks would be greatly appreciated.

Ask a question
CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jean-François Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.


This document, titled « LAMP (Apache + MySQL + PHP) - quick install on Linux », is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).