What is the difference between lamp or LNMP or Lnamp? Which is good to install?

Source: Internet
Author: User

The full name of the lamp is Linux + apache + mysql +php
Lnmp's full name is Linux + nginx + mysql + PHP
Lnamp's full name is Linux + nginx + apache + mysql + php

Nginx Features
Nginx performance is stable, feature-rich, simple operation and maintenance, processing static file speed and consumption of system resources is very small.
1, compared to Apache, with Nginx as a WEB server: Use less resources, support more concurrent connections, more efficient.
2. As a Load Balancer server: Nginx can support both Rails and PHP internally, as well as HTTP proxy servers for external service. Nginx written in C, whether it is the system resource overhead or CPU use efficiency is much better than Perlbal.
3, as the Mail proxy server: Nginx is also a very good mail proxy server (one of the first to develop this product, is as a mail proxy server).

4, reverse proxy can be based on the URL to the request to the different purposes of the cluster, than the chip request, to the picture server cluster; Video request, turn the video server cluster.

Nginx is a lightweight Web server/reverse proxy server/e-mail proxy server, the installation is very simple, the configuration file is also very concise (also support Perl syntax). Nginx supports the smooth loading of new configurations and the ability to upgrade software versions with uninterrupted service.


Apache Features
1, Apache is the core of the LAMP architecture Web Server, open source, stable, module Rich is the advantage of Apache. But the disadvantage of Apache is a bit bloated, memory and CPU overhead, performance loss, as some lightweight Web servers (such as Nginx, tengine, etc.) efficient, lightweight Web server for static file responsiveness is much higher than the Apache server.

2, Apache as Web Server is the best choice to load PHP, if the traffic is very large, you can use Nginx to load non-PHP Web requests. Nginx is a high-performance HTTP and reverse proxy server, and Nginx is known for its stable, rich feature set, sample configuration files, and low system resource consumption. Nginx now supports PHP and FastCGI, as well as load balancing and fault tolerance, and can be used in conjunction with Apache, and is the preferred choice for lightweight HTTP servers.

3, the WEB server cache also has a variety of scenarios, Apache provides its own cache module, you can also use the addition of SQUID module for caching, both of which can effectively improve the access response of Apache. Squid cache is a Web cache server that supports efficient caching and can cache related requests as a front cache server for Web servers to improve Web server speed. Put Squid on the front of Apache to cache Web servers to generate dynamic content, and Web applications only need to set the page's actual time appropriately. If the traffic is huge, consider using Memcache as the distributed cache.

4, the acceleration of PHP can use the Eaccelerator Accelerator, Eaccelerator is a free and open source PHP accelerator. It optimizes dynamic content caching, improves PHP script cache performance, and enables PHP scripts to be almost completely eliminated from the server in the compiled state. It also optimizes the script to accelerate its execution. Increase the efficiency of PHP program code by up to 1-10 times.

Two: As for the installation which good?
To save memory words LNMP is the best choice, but it seems not very stable, sometimes more often 502
Static multi-use LNMP is still good.
More dynamic content, lamp is still the most stable
Lnamp is now a more popular combination, that is, nginx to do the front-end processing static, Apache to do background processing dynamics, so compared to the LNMP php-cgi relatively stable


Three: The specific Dynamic Web server architecture solution has the following types:
1, squid + Apache + PHP + eaccelerator
Using the Apache payload Php,squid cache, HTML or picture requests can be returned directly from squid to the user. This architecture is used by many large websites.
2, Nginx/apache + PHP (FastCGI) + eaccelerator
Use the Nginx or Apache load php,php to run with FastCGI, which is highly efficient.

3, Nginx + Apache + PHP + eaccelerator
This scheme synthesizes the advantages of Nginx and Apache, uses Apache load Php,nginx to parse other WEB requests, uses Nginx rewrite module, Apache port is not open to the outside.

Four: Database
In the open source database, MySQL is the first choice for performance, stability, and functionality, and can achieve millions data storage. MySQL and web servers can be put together initially, but when the traffic reaches a certain scale, the MySQL database should be isolated from the Web server and run on a separate server while maintaining a stable connection between the Web server and the MySQL server.
When database traffic reaches a higher level, consider using a solution such as a DB cluster such as MySQL Cluster or a library table hash.
Overall, the performance of the LAMP architecture will be much better than a website such as Windows IIS + ASP + Access (e.g. Moonlight blog). Can load access is also very large, a large number of domestic personal sites to support large traffic, the use of LAMP architecture is a good solution. Of course, the first push LNMP architecture.
In summary, based on LAMP architecture design with low cost, flexible deployment, rapid development, security and stability characteristics, is a good combination of Web application and environment. If the server configuration is lower than the personal site, of course preferred LNMP architecture.


Summary: Actually all good, the key also depends on the actual production environment application and use of the person, system or software is a tool, different people, with the result is not the same, this is very practical.


Reference: http://portal.digitser.cn/article-226-1.html


This article is from the "Boyhack" blog, make sure to keep this source http://461205160.blog.51cto.com/274918/1743472

What is the difference between lamp or LNMP or Lnamp? Which is good to install?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.