Nginx
LNMP (linux nginx mysql php) also called LEMP (Linux engin x nginx mysql php)
3w Concurrent, ten threads, just 150m memory .... A little exaggeration, also shows good.
Nginx Features:
A.WWW Web Services
B. load Balancing ( reverse proxy )
C.web Cache(Web cache)
The advantages of Nginx:
0, the configuration is simple, flexible.
1. High concurrency (static small files), static 1-2w,Apache concurrent 3-5 thousand.
2. consumes less resources.
3. features are many, each function is not particularly strong.
4. supports the Epoll model. Allows nginx to support high concurrency.
5. different from Apache with dynamic service
6. The use of Nginx can be limited to the IP limit , you can limit the number of connections,Apache but also third-party.
call Phpfastcgi will need php Send to fcgi 9000 port parsing. fcgi is a dynamic concurrency bottleneck 500-1500 mysql 300-1500 sql statement processing is not good, concurrency is smaller.
Day pv2000 million below, can be directly with nginx agent,Apache can also act as agent, but the performance is very poor, generally no one uses.
Nginx Cache is equivalent to vanish,squid.
Nginx adopts epoll model (using directory mode)
Apache uses select model (with select, flip-page search)
final recommendation, external business Nginx, internal Apache
Install the pcre openssl,yum install . nginx installation module must be done one at a time, not like Apache later through the module apxs way to press in.
then compile and install nginx:
Useradd nginx-s/sbin/nologin-m
cd/home/weipeng/tools/nginx-1.6.2
./configure \
--user=nginx \
--group=nginx \
--prefix=/application/nginx1.6.2 \
--with-http_stub_status_module \
--with-http_ssl_module
Make&&make Install
Ln-s/application/nginx1.6.2/application/nginx
then start the Nginx:
1. /application/nginx/sbin/nginx-t Check Syntax
2. /application/nginx/sbin/nginx start nginx
3. lsof-i: View boot port
local Curl 192.168.44.20 then browser access to see the Welcome to Nginx Web page.
The theory and actual practice of Nginx Web Service