Learning Nginx (I.)

Source: Internet
Author: User
Tags openssl
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 >

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.