1. Download Source
Create a directory to download the source code and extract
mkdir nginx_src
cd nginx_src
wget http://nginx.org/download/nginx-1.17.0.tar.gz
nginx-tar -xf 1.17.0.tar.gz
Because they have to open ssl support, mail server, you need to install the OpenSSL library in advance
2. The configuration specifies / nginx installation directory and open ssl, the message generating module Makefile, compiler installation
cd nginx-1.17.0/
./configure --prefix=/nginx --with-http_ssl_module --with-mail --with-mail_ssl_module
make
make install
3. Check the installation / nginx
[root@localhost nginx]# ./sbin/nginx -V
nginx version: nginx/1.17.0
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC)
built with OpenSSL 1.0.2k-fips 26 Jan 2017
TLS SNI support enabled
configure arguments: --prefix=/nginx --with-http_ssl_module --with-mail --with-mail_ssl_module
4 configuration needed to start /nginx/conf/nginx.conf
./sbin/nginx