LAMP (software bundle)

From Wikipedia, the free encyclopedia
Jump to: navigation, search
The LAMP, LYME and LYCE software bundles, displayed here together with Squid. High-performance and high-availability web server solutions providing security in hostile environments.

The acronym LAMP refers to first letters of the four components of a solution stack, composed entirely of free and open-source software, suitable for building high-availability heavy-duty dynamic web sites, and capable of serving tens of thousands of requests simultaneously.

The meaning of the LAMP acronym depends on which specific components are used as part of the actual bundle:

The exact combination of the software included in a LAMP stack is prone to variation, for example Apache web server can be replaced by some other web server software. Though 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, so they work and scale very well together. 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 the slightest 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 is very well tested regarding performance and security. At the same time, there is an abundance of experienced contractors to do the tailoring required for various customizations, or for complex setups. There is also constant development going on.

The components of the LAMP stack are present in the software repositories of most (if not all) Linux distributions, giving any end-user a simple way to install, set up and operate an initial LAMP stack out of the box. The web presence of a small company that does not have a high hit count and is not prone to frequent attacks, can therefore be administered by another small company, by a one man company or even by a student.

The LAMP bundle can be and often is combined with many other free and open-source software packages such as, for example:

Software components[edit]

High-level overview of LAMP components

Linux[edit]

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%.[1]

Many options are available for customizing and securing Linux installations, for example by using SELinux, or by employing chroot environments.

Apache[edit]

Apache is a web server, the most popular in use. As of June 2013, Apache was estimated to serve 54.2% of all active websites and 53.3% of the top servers across all domains.[2]

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[edit]

MySQL is a multithreaded, multi-user, SQL database management system (DBMS) now owned by Oracle Corporation.[3] MySQL has been owned by Oracle Corporation since January 27, 2010 through the purchase of Sun Microsystems.[4][5] 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.

MariaDB is a fork of MySQL. 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.

Other RDBM systems such as PostgreSQL (forming up the LAPP bundle) are also viable.[6]

PHP, Perl, Python[edit]

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.[7]

PHP is free software released under the PHP License, which is incompatible with the GNU General Public License (GPL) due to restrictions on the usage of the term PHP.[8]

Perl is a family of high-level, general-purpose, interpreted, dynamic programming languages. The languages in this family include Perl 5 and Perl 6.[9] The Perl languages borrow features from other programming languages including C, shell scripting (sh), AWK, and sed.[10] They provide powerful text processing facilities without the arbitrary data-length limits of many contemporary Unix commandline tools,[11] 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.[12]

Python is a widely used general-purpose, high-level programming language.[13] 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.[14] 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[edit]

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.[15] 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).[16]

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.[17]

High availability and load balancing[edit]

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).[18]

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.[18]

See also[edit]

Possible additions[edit]

References[edit]

  1. ^ "Debian/Ubuntu extend the dominance in the Linux web server market". W³Techs. 2013-10-21. 
  2. ^ "June 2013 Web Server Survey". Netcraft. Retrieved 2013-06-12. 
  3. ^ Top Reasons for Product Managers to Embed MySQL on [mySQL.co]
  4. ^ Robin Schumacher & Arjen Lentz Dispelling the Myths[dead link]
  5. ^ Charles Babcock, InformationWeek Sun Locks Up MySQL, Looks To Future Web Development
  6. ^ A LAPP appliance on [turnkeylinux.org]
  7. ^ "Introduction: What can PHP do?". PHP Manual. Retrieved 2009-03-05. 
  8. ^ "GPL-Incompatible, Free Software Licenses". Various Licenses and Comments about Them. Free Software Foundation. Retrieved 2012-03-11. 
  9. ^ "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"." 
  10. ^ Ashton, Elaine (1999). "The Timeline of Perl and its Culture (v3.0_0505)". 
  11. ^ Wall, Larry, Tom Christiansen and Jon Orwant (July 2000). Programming Perl, Third Edition. O'Reilly Media. ISBN 0-596-00027-8. 
  12. ^ Smith, Roderick W. (21 Jun 2002). Advanced Linux Networking. Addison-Wesley Professional. p. 594. ISBN 978-0-201-77423-8. 
  13. ^ "Programming Language Trends - O'Reilly Radar". Radar.oreilly.com. 2006-08-02. Retrieved 2013-07-17. 
  14. ^ "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."
  15. ^ "Setting up a LEMP Stack (Linux, Nginx, MySQL, PHP5) on Ubuntu 9.04". chrisjohnston.org. 2009-04-29. Retrieved 2014-01-22. 
  16. ^ "Featured Users". PostgreSQL. Retrieved 2014-01-22. 
  17. ^ "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. 
  18. ^ a b 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. 

External links[edit]