LAMP (software package)

from Wikipedia, the free encyclopedia

LAMP is an acronym for the combined use of programs based on Linux to provide dynamic websites . The individual letters of the acronym stand for the components used:

operating system Linux
Web server Apache
Database MySQL
programming language PHP

In terms of software distribution, this program combination defines an infrastructure within which dynamic websites and applications can be developed and provided.

Although the programs were not originally designed to work together, the bundle quickly became successful because it was and is easily available and inexpensive to procure. Over time, a large number of community projects have developed around LAMP that create documentation and simple installation routines for LAMP systems.

The name LAMP was coined by the Heise author Michael Kunze, who showed in an article in the 1998 c't that the LAMP software combination is equally efficient compared to proprietary software solutions.

Components

LAMP stack components

The original LAMP stack consists of the four components of Linux (operating system), Apache (Web server), MySQL ( database system ) and PHP (server-side script - interpreter ). These components are reusable and can be used in different environments and compositions.

Over time, new software has been written and also made available under a free license, e.g. B. various web servers. This software can replace the traditional components, but are then called differently (see under variants ). Additional components are also common, such as Squid , Snort , Nagios or the RRDtool to create statistics.

The only specialization consists in the software units that connect the script interpreter with the web server on the one hand and with the database system on the other, named here libapache2-mod-php5and php5-mysqlafter the package names in Ubuntu systems .

A request from the web first reaches the network card . The operating system determines which program is intended for processing. This is done using the port number that is explicitly or implicitly contained in the request. Linux forwards the request to the Apache server. The request contains an address with which the web server can decide which file is to be fetched from the file system . If this is an HTML file, in most cases additional files belong to it, for example images in JPEG format. If the file indicates that a script is to be executed, the web server calls the corresponding script interpreter, here PHP. In principle, any instructions can be executed in the script, but database content is often prepared in the context of dynamically adapted websites. To do this, the script calls the database system.

Once the database contents have been obtained, formatted and prepared in the script and linked to the other contents from the file system on the web server, the result is returned to the operating system, which delivers it via the network card.

variants

The individual components of the LAMP system can be replaced by similar components. For example, the distribution can also be based on other operating systems such as Windows , macOS , Solaris or others. The corresponding distributions are then called WAMP , MAMP or equivalent. If MySQL is replaced by PostgreSQL , the bundle is called LAPP . When using the web server nginx instead of Apache , the name changes to LEMP . Since the development of MariaDB , the "M" can also stand for this database system. Often the first letter is also replaced by an "X" to make descriptions independent of the operating system. Alternatives for a bundle can e.g. B. be:

component LAMP variant Examples of component alternatives
operating system Linux Windows , Solaris
Web server Apache nginx , Node.js (possibly supplemented by Apache or nginx)
Database MySQL PostgreSQL , CouchDB , MariaDB
programming language PHP Perl , Ruby , JavaScript , and practically all other interpreter and compiler languages, possibly via CGI , FastCGI

example

Presentation of how PHP works

The wiki software MediaWiki , with which Wikipedia is also operated, is an example of an application program that is based on a LAMP environment. The server, which provides the dynamic Wikipedia website , uses PHP scripts to generate data from a MySQL database and to make it available via Apache over the World Wide Web . The "dynamics" make it possible to change page contents - changes are then written back to the MySQL database. All program components used are open source . Since April 2013, Wikipedia has been using MariaDB instead of MySQL.

Other software combinations

Web links

Individual evidence

  1. Michael Kunze: Let it shine. In: c't No. 12, June 19, 1998, p. 230.
  2. MAMP is described in the book Mac OS X in a Nutshell by O'Reilly, ISBN 978-0-596-00370-8 .
  3. The MEAN Stack: MongoDB, ExpressJS, AngularJS and Node.js. In: The MongoDB Blog. April 30, 2013, accessed February 3, 2014 .
  4. Linux Magazine 02/2016