nginx overview and installation

Nginx:

Nginx  (engine x) is a high-performance HTTP and reverse proxy web server, and also provides IMAP / POP3 / SMTP services. Nginx was developed by Igor Sesoyev for the second most visited Rambler.ru site (Russian: Рамблер) in Russia. The first public version 0.1.0 was released on October 4, 2004.
It publishes the source code in the form of a BSD-like license and is known for its stability, rich feature set, sample configuration files, and low system resource consumption. On June 1, 2011, nginx 1.0.4 was released.
Nginx is a lightweight Web server / reverse proxy server and email (IMAP / POP3) proxy server, released under the BSD-like protocol. It is characterized by low memory occupation and strong concurrency. In fact, nginx's concurrency capability performs better in the same type of web server. The users of nginx in mainland China include Baidu, Jingdong, Sina, NetEase, Tencent, Taobao, etc.
 

Nginx application scenarios:

1. High-performance static web server
2. Reverse proxy function: as shown below:

 

 

 

The advantages of Nginx compared to Apache:

 

 

The whole process of an http request:

 

Nginx process of processing requests

 

Advantages of Nginx: 

1. High concurrency, high performance

2, good scalability

3. Using an asynchronous non-blocking event-driven model

4. High reliability

5. Hot loading 

 

Nginx installation:

nginx installation and configuration 
	1. Compile and install nginx software, this step is very important, 
	1. Compile and install nginx software, this step is very important, 
	1. Compile and install nginx software, this step is very important, 
	1. Compile and install nginx software, this step is very important , 
	1. Compile and install nginx software, this step is very important, 
	0.yum install gcc patch libffi-devel python-devel zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4 -devel libpcap-devel xz-devel openssl openssl-devel -y 

	1. Download the source package (under / opt) 
	wget -c https://nginx.org/download/nginx-1.12.0.tar.gz 

	2. Source compression 
	the tar-1.12.0.tar.gz -zxvf Nginx 

	3. configuration, compiler installation   
	./configure --prefix = / opt / nginx112 / [--with-http_ssl_module] open ssl module   
	
		and the install the make && the make   


	4. start nginx, enter the sbin directory, find the nginx start command 

	cd sbin 
	./nginx #start
	./nginx -s stop # Close. / 
	nginx -s reload #smooth restart, after modifying nginx.conf, you can load the new configuration without restarting the service

 

Guess you like

Origin www.cnblogs.com/zach0812/p/12732817.html