LAMP (software bundle)
|This article needs additional citations for verification. (July 2014)|
LAMP is an acronym for a web services solution stack consisting of Linux, the Apache HTTP Server, the MySQL or MariaDB database engines, and the PHP or Perl, or Python programming language. All components are free and open-source software, and the combination is suitable for building dynamic web pages.
The combination of the software included in a LAMP stack may vary, for example the Apache web server can be replaced by some other web server software. Although the original authors of these programs did not design them to work as a component of the LAMP stack, the development philosophy and tool sets are shared and were developed in close conjunction. The software combination has become popular because it is entirely free and open-source software, which means that each component can be adapted to the underlying hardware and customized to meet the specification as exactly as possible, without overt vendor lock-in. The complete software stack is also free of cost, maximizing the available budget for tailoring the hardware and software.
Due to the nature of free and open-source software and the ubiquity of its components, each component of the LAMP stack has been tested for performance and security. At the same time, continuing development and an abundance of experienced developers permit new features and custom modification for specific applications.
The components of the LAMP stack are present in the software repositories of most Linux distributions, providing a simple way to install, set up and operate a LAMP stack out of the box. The website of a small company is typically not subject to high traffic and is not prone to frequent attacks, and can therefore be administered with minimal resources.
The LAMP bundle can be and often is combined with many other free and open-source software packages such as, for example:
- netsniff-ng for security testing and hardening
- Snort, an intrusion detection (IDS) and intrusion prevention system (IPS)
- RRDtool for diagrams
- Nagios, Collectd or Cacti, for monitoring.
For example, the software which Wikipedia and other Wikimedia projects use for their underlying infractructure is in fact a highly augmented and customized LAMP stack with additions such as Linux Virtual Server (LVS) for load balancing and Ceph and Swift for distributed object storages.
Linux is a Unix-like and POSIX-compliant computer operating system assembled under the model of free and open source software development and distribution. The main form of distribution are Linux distributions, usually providing complete LAMP setups out of the box through their package management systems. Of the most widespread Linux distributions, as of 1 October 2013, 58.5% of web server market share is shared between Debian and Ubuntu, while RHEL, Fedora and CentOS together share 37.3%.
The Apache HTTP Server is the most popular web server in use; as of June 2013[update], Apache was estimated to serve 54.2% of all active websites and 53.3% of the top servers across all domains. As of June 2014[update], Apache was estimated to serve 52.27% of all active websites followed by nginx with 14.36%, and 53.32% of the top servers followed by nginx with 18.16%.
Apache is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation. Released under the Apache License, Apache is open-source software. A wide variety of features is supported, and many of them are implemented as compiled modules which extend the core functionality of Apache. These can range from server-side programming language support to authentication schemes.
MySQL, MariaDB, MongoDB
MySQL is a multithreaded, multi-user, SQL database management system (DBMS) now owned by Oracle Corporation. MySQL has been owned by Oracle Corporation since January 27, 2010 through the purchase of Sun Microsystems. Sun had originally acquired MySQL on February 26, 2008. The MySQL development project has made its source code available under the terms of the GNU General Public License, as well as under a variety of proprietary agreements.
MongoDB is a widely used open-source NoSQL database. MongoDB eschews the traditional table-based relational database structure in favor of JSON-like documents with dynamic schemas (calling the format BSON), making the integration of data in certain types of applications easier and faster.
PHP, Perl, Python
PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language. PHP code is interpreted by a web server with a PHP processor module, which generates the resulting web page: PHP commands can be embedded directly into an HTML source document rather than calling an external file to process data. It has also evolved to include a command-line interface capability and can be used in standalone graphical applications.
Perl is a family of high-level, general-purpose, interpreted, dynamic programming languages. The languages in this family include Perl 5 and Perl 6. The Perl languages borrow features from other programming languages including C, shell scripting (sh), AWK, and sed. They provide powerful text processing facilities without the arbitrary data-length limits of many contemporary Unix commandline tools, facilitating easy manipulation of text files. Perl 5 gained widespread popularity in the late 1990s as a CGI scripting language, in part due to its parsing abilities.
Python is a widely used general-purpose, high-level programming language. Python supports multiple programming paradigms, including object-oriented, imperative and functional programming or procedural styles. It features a dynamic type system and automatic memory management and has a large and comprehensive standard library. Like other dynamic languages, Python is often used as a scripting language, but is also used in a wide range of non-scripting contexts.
Variants and equivalents on other platforms
With the growing use of LAMP, variations and retronyms appeared for other combinations of operating system, web server, database, and software language. For example the equivalent installation on a Microsoft Windows operating system is known as WAMP. An alternative running IIS in place of Apache called WIMP. Variants involving other operating systems include MAMP (Macintosh), SAMP (Solaris), FAMP (FreeBSD) and iAMP (iSeries).
The web server or database management system also vary. LEMP is a version where Apache has been replaced with the more lightweight web server Nginx. A version where MySQL has been replaced by PostgreSQL is called LAPP, or sometimes by keeping the original acronym, LAMP (Linux / Apache / Middleware (Perl, PHP, Python, Ruby) / PostgreSQL).
A server running LAMP may be colloquially known as a lamp box, punning on the type of post box. The GNU project is advocating people to use the term "GLAMP" since many distributions of what is known as "Linux" include the GNU tools as well as the Linux kernel.
High availability and load balancing
Specific solutions are required for web sites serving large numbers of requests, or providing services demanding no downtimes. Usual approach for the LAMP stack involves multiple web and database servers, with additional components providing logical aggregation of resources provided by each of the servers, and distribution of the workload across multiple servers. Such aggregation for web servers is usually provided by a form of load balancer placed in front of them, such as Linux Virtual Server (LVS). For the database servers, MySQL provides internal replication mechanisms, implementing a master/slave relationship between the original database (master) and its copies (slaves).
Such setups are improving the availability of LAMP instances by providing various forms of redundancy, making it possible for a certain number of instance's components (separate servers) to go down without causing interruptions to provided services. Also, such redundant setups allow for hardware failures resulting in data loss on separate servers, without the stored data actually becoming lost. Besides higher availability, such LAMP setups are providing almost linear improvements in performance for services where the number of internal database read operations is much higher than the number of write/update operations.
- "Debian/Ubuntu extend the dominance in the Linux web server market". W³Techs. 2013-10-21.
- "June 2013 Web Server Survey". Netcraft. Retrieved 2014-06-27.
- "June 2014 Web Server Survey". Netcraft. Retrieved 2014-06-27.
- Top Reasons for Product Managers to Embed MySQL on [mySQL.co]
- Robin Schumacher & Arjen Lentz Dispelling the Myths
- Charles Babcock, InformationWeek Sun Locks Up MySQL, Looks To Future Web Development
- A LAPP appliance on [turnkeylinux.org]
- "Introduction: What can PHP do?". PHP Manual. Retrieved 2009-03-05.
- "GPL-Incompatible, Free Software Licenses". Various Licenses and Comments about Them. Free Software Foundation. Retrieved 2012-03-11.
- "About Perl". perl.org. Retrieved 2013-04-20. ""Perl" is a family of languages, "Perl 6" is part of the family, but it is a separate language which has its own development team. Its existence has no significant impact on the continuing development of "Perl 5"."
- Ashton, Elaine (1999). "The Timeline of Perl and its Culture (v3.0_0505)".
- Wall, Larry, Tom Christiansen and Jon Orwant (July 2000). Programming Perl, Third Edition. O'Reilly Media. ISBN 0-596-00027-8.
- Smith, Roderick W. (21 Jun 2002). Advanced Linux Networking. Addison-Wesley Professional. p. 594. ISBN 978-0-201-77423-8.
- "Programming Language Trends - O'Reilly Radar". Radar.oreilly.com. 2006-08-02. Retrieved 2013-07-17.
- "About Python". Python Software Foundation. Retrieved 24 April 2012., second section "Fans of Python use the phrase "batteries included" to describe the standard library, which covers everything from asynchronous processing to zip files."
- "Setting up a LEMP Stack (Linux, Nginx, MySQL, PHP5) on Ubuntu 9.04". chrisjohnston.org. 2009-04-29. Retrieved 2014-01-22.
- "Featured Users". PostgreSQL. Retrieved 2014-01-22.
- "Words to Avoid (or Use with Care) Because They Are Loaded or Confusing - GNU Project - Free Software Foundation". Gnu.org. 2014-01-17. Retrieved 2014-01-22.
- Dragan Simic; Srecko Ristic; Slobodan Obradovic (April 2007). "Measurement of the Achieved Performance Levels of the WEB Applications With Distributed Relational Database" (PDF). Electronics and Energetics 20 (1). Facta Universitatis. p. 31–43. Retrieved 30 January 2014.
- Install a LAMP server on Ubuntu Linux
- Install a LAMP server on Debian GNU/Linux
- Install a LAMP server on SUSE Linux
- Install a LAMP server on Fedora Linux
- Install a LAMP server on CentOS Linux
- Install a LAMP server on FRITZ!Box
- Install a LAMP server from source code