Nginx features and installation


Nginx efficient server

Nginx features

  • Fast speed: it uses technologies such as read ahead connection pool and memory pool to make a single HTTP request faster. Multi process architecture, light task idea

  • Good expansibility: the structure of “core” + “module” provides a C-level module development mechanism

  • High reliability: the core consists of a very light tasksupervisor process(master process) and several work processes. Specific HTTP requests are load balanced within the work process. If a work process terminates abnormally, the management process will quickly restart a new work process to take over

  • Low memory usage

  • High concurrency: the idea of fully asynchronous and non blocking I / O runs through the core, module and NGX_ Lua modules are non blocking high-speed operation

  • Hot deployment: because the management process and work process of nginx are designed separately, the hot deployment function can be realized

  • Open Source

Source code compilation and installation

Container centos8

//1. Download nginx source file


tar -zxvf nginx-1.16.1.tar.gz

//2. Check installation dependency

yum install -y gcc gcc-c++ pcre pcre-devel zlib zlib-devel openssl openssl-devel

//3. Configure installation options (customized for easy learning)

./configure --prefix=/opt/nginx --sbin-path=/opt/nginx/sbin/nginx

//4. Compilation and installation

make && make install

//5. Start, stop and restart - P specify nginx directory to realize multiple nginx instances to meet different applications

/opt/nginx/sbin/nginx -p /opt/nginx/

/opt/nginx/sbin/nginx -p /opt/nginx -s stop

/opt/nginx/sbin/nginx -p /opt/nginx -s reload

This work adoptsCC agreement, reprint must indicate the author and the link to this article

Recommended Today


Supervisor [note] Supervisor – H view supervisor command help Supervisorctl – H view supervisorctl command help Supervisorctl help view the action command of supervisorctl Supervisorctl help any action to view the use of this action 1. Introduction Supervisor is a process control system. Generally speaking, it can monitor your process. If the process exits abnormally, […]