[TOC]

1. Confirm the four items (Redhat is used in this example).

  1. Check the system network ping www.baidu.com
  2. Confirm yum yum available list | grep GCC
  3. Confirm that the iptables rule is disablediptables -L/iptables -t nat -LIf there areiptables -F/iptables -t nat -FClose the rules
  4. Confirm that disabling selinux GetenForce should be Disabled if it is not.setenforce 0

2. Two installation (yum list | grep GCC)

  1. yum -y install gcc gcc-c++ autoconf pcre pcre-devel make automakeSystem base library
  2. yum -y install wget httpd-tools vimSome basic tools

3. Catalog introduction

cd /opt; Mkdir app(SRC) download(SRC package) logs(log) work

Nginx Middleware Architecture introduction
  1. Nginx is an open source, high-performance, reliable HTTP middleware, proxy service.
  2. Common HTTP service HTTPD -Apache IIS – ms GWS -Google
  3. IO multiplexing epoll (Select model and Epoll model) multiplexing: the sequential completion of concurrent alternation within a thread 2. 3. CPU affinity is a binding method between CPU core and Nginx working process, which fixes each worker process on one CPU for execution. Reduce cache misses for CPU switching for better performance. 4. Sendfile (reference with Linux 0 copy) directly through the kernel space to copy static resources into socket (original need through user space) ###

Mainline version – Development version Stable Version – Legacy version – Historical version Changes What are the Changes ######1. Modify yum source (add nginx dependencies)

  • Create an nginx.repo in /etc/ym.repos.d /
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/7/$basearch/
gpgcheck=0
enabled=1
Copy the code
  • thenyum list | grep nginxYum yum yum yum yum yum yum yum
  • thenyum install nginxThe installation.
  • Check whether the installation is successful
    1. Nginx -v Compilation information Nginx -v version information
    2. Compile parameters at installation time –user=nginx –group=nginx Sets the user and user group to start the nginx process
    3. Nginx. conf introduction to systemctl restart nginx.service Restart service #####[Expanded] Introduction to some directories

      [^1]: Footnote content