1, install the build environment
yum -y install make zlib zlib-devel gcc-c++ libtool openssl openssl-devel
2, the official website to download nginx nginx source package
selection map stable version, and stores the root directory nginx
3, enter the directory extracting archive
nginx-tar -xf 1.16.0.tar.gz
4, cd into the extracted directory
cd nginx-1.16.0/
5, configure the installation directory
./configure --prefix = / usr / local / nginx
I installed in the / usr / local /
6, make the compiler
7, make install installation