First, why is Nginx
High Concurrency: Support for event ports on Linux Epoll,solaris and Kqueue on FreeBSD. A single machine supports more than 10w of concurrent connections.
Modularity: High scalability, composed of a number of different functions, different levels, different types, low coupling module.
Low memory consumption: 10,000 non-active HTTP keep-alive connections only shui DUI Shang 2.5MB of memory.
Thermal deployment: Master and worker worker process separation design, support for hot deployment, 7x24 hours uninterrupted service. Second, build nginx environment 2.1 Operating system support
Linux (recommended), macos,freebsd,solaris,windows (The reason for Select, does not support high-performance concurrency). 2.2 Linux Kernel requirements
2.6 and later (Uname–a View kernel version) 2.3 prerequisite Software
GCC compiler: Compilation tool. If not, please download and install Yum install–y gcc
Pcre Library: Regular expression support, if not required, can not be installed. Yum Install–y pcre Pcre-devel
Zlib Library: The content of the HTTP package to do gzip compression, if not required, can not be installed. Yum install–y zlib Zlib-devel
OpenSSL: Support for SSL protocol, if not required, can not be installed. Yum install–y OpenSSL openssl-devel 2.4 nginx Download Installation
Download Nginx source code from Nginx official website. www.nginx.org
Installation:
./configure
Make
Make install
The default is to install to the/usr/local/nginx directory.
Run:
Cd/usr/local/nginx
./nginx
Access test:
Curl http://localhost If you can see the HTML page data, Welcometo Nginx, it means success.
< to Be continued >